/ Published in: HTML
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
// Filter to add new myprofile link to nav menu
function new_nav_menu_items($items) {
$items = $items . $profilelink;
return $items;
}
add_filter( 'wp_list_pages', 'new_nav_menu_items' );
add_filter( 'wp_nav_menu_items', 'new_nav_menu_items' );
// Create Member Profile link with shortcode in pages and posts
function member_profile( $atts, $label = null ) {
echo '' . $label . '';
}
add_shortcode('member_profile', 'member_profile');
Next, add the following to your style.css in order to float the new profile link to the right and add some font color and weight:
li#my-profile.my-profile {
float:right;
}
li#my-profile.my-profile a {
font-weight:bold;
color:red;
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                