Skip to:
Content
Pages
Categories
Search
Top
Bottom

Help with Buddypress URLs

  • Avatar of AkumaSeijin
    AkumaSeijin
    Participant

    @akumaseijin

    So, I decided I want to make a custom floating menu on my site and put most of the buddypress functions there to get rid of the clutter on the page itself but I am having a bit of a problem.

    Example: http://example.com/members/exampleuser/

    The menu plugin i’m using grabs from the appearance/menu screen. So, If I am going to add items by url how would I replicate this?

Viewing 8 replies - 1 through 8 (of 8 total)
Avatar of @mercime
@mercime
Keymaster

@mercime

@akumaseijin you have to find the theme_location of your secondary custom menu. For example, in the Twenty Ten theme, the theme_location is ‘primary’ see http://codex.wordpress.org/Function_Reference/wp_nav_menu#Used_in_the_Twenty_Ten_theme

After you find the theme_location of your secondary menu, replace mamamia in what I posted at http://pastebin.com/jFLsdDJG

Avatar of AkumaSeijin
AkumaSeijin
Participant

@akumaseijin

I did “Inspect Element” on the Menu page to see if I could get the code and I thought I did “cfm_floating_menu” but it still didn’t work. Is there another identifier I can try?

Avatar of @mercime
@mercime
Keymaster

@mercime

You need to look for the theme_location within the template file, not in the source code (inspect element).

Avatar of AkumaSeijin
AkumaSeijin
Participant

@akumaseijin

I found it. “CFM_LOCATION” but it still isn’t working.

Avatar of AkumaSeijin
AkumaSeijin
Participant

@akumaseijin

So far this is the only code I found that works but it puts it in both menus. I tested your code with “primary” and nothing happened.

` // 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
$profilelink = ‘

  • ‘ . __(‘Visit your Awesome Profile’) . ‘
  • ‘;
    $menu = $menu . $profilelink;
    return $menu;
    }
    `

    Viewing 8 replies - 1 through 8 (of 8 total)

    You must be logged in to reply to this topic.