Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
In reply to: How do you put the "My Profile" link on the menu?
sorry I forgot to mention that you should include the nav parent id for all the menus where you don’t want the link do be displayed:
#main-nav .edit-my-profile, #footer-nav .edit-my-profile, #any-nav .edit-my-profile { display: none; }
In reply to: How do you put the "My Profile" link on the menu?A temporary fix:
// Filter wp_nav_menu() to add profile link add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' ); function my_nav_menu_profile_link($menu) { if (!is_user_logged_in()) return $menu; else $current_user = wp_get_current_user(); $user=$current_user->user_login ; $profilelink = '<li class="edit-my-profile"><a href="http://www.mysite.com/forums/users/' . $user . '/edit">My Profile/Edit Profile</a></li>'; $menu = $menu . $profilelink; return $menu; }
and then add this in your CSS file:
.edit-my-profile {display: none;}
I’m still interested in getting Robin’s function to work without the CSS fix.
In reply to: How do you put the "My Profile" link on the menu?Hi Robin,
Your solution the menu worked for but it displays in all my menus. How can I make it display in a custom menu?
Thanks!
In reply to: BBPress Single Forum Menu ItemI’m grad this issue is getting worked on.
Hey Evan Herman can you please share your temporal solution code exactly as I should paste it in my functions.php
I pasted it like this but nothing happened:
$body_class = get_body_class(); if ( in_array('bbpress',$body_class) ) { ?> <script> jQuery(document).ready(function() { jQuery('.menu-item-347').removeClass('current_page_parent'); jQuery('.menu-item-2592').addClass('current_page_parent'); }); </script> <?php }
Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)