Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Add a Custom "My Profile" link to the Main Menu
- *
- */
- function cbox_custom_profile_menu_item ( $items, $args ) {
- if ($args->theme_location == 'main-menu') {
- $profilelink = '<li class="my-home-menu"><a href="' . bp_loggedin_user_domain( '/' ) . '">' . __('My Home') . '</a></li>';
- $items .= '';
- $items = $items . $profilelink;
- }
- return $items;
- }
- add_filter( 'wp_nav_menu_items', 'cbox_custom_profile_menu_item', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment