Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • 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 = '<li><a href="' . bp_loggedin_user_domain( '/' ) . '" rel="nofollow">' . __('Visit your Awesome Profile') . '</a></li>';
                        $menu = $menu . $profilelink;
                        return $menu;
        }
    

    AkumaSeijin
    Participant

    @akumaseijin

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


    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?


    AkumaSeijin
    Participant

    @akumaseijin

    I actually grabbed this code from another support post:

        // 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 = '<li><a href="' . bp_loggedin_user_domain( '/' ) . '" rel="nofollow">' . __('Visit your Awesome Profile') . '</a></li>';
                        $menu = $menu . $profilelink;
                        return $menu;
        }
    

    But it adds it to both of my menus I only want it on a secondary one. It’s a floating menu. On the menu page it is labeled ” CodeFlavors floating menu ” and the menu itself I call “Floating” don’t know if that wil help with the code alteration. Also, one more thing. Is there a way to add it to the top of the menu instead of the bottom?


    AkumaSeijin
    Participant

    @akumaseijin

    All pages work except anything profile related.


    AkumaSeijin
    Participant

    @akumaseijin

    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.


    AkumaSeijin
    Participant

    @akumaseijin

    I did change domains today and thats what made everything stop working. But I also changed it in general settings. What is happening? do I need to start from scratch?


    AkumaSeijin
    Participant

    @akumaseijin

    actually it happens for anything profile related


    AkumaSeijin
    Participant

    @akumaseijin

    Nvm found a similar guide. I also had to change the functions.php


    AkumaSeijin
    Participant

    @akumaseijin

    Actually Aces, when I logged out the menu didn’t show up. I created a secondary menu but with the original BP theme there is no place to designate a secondary menu.


    AkumaSeijin
    Participant

    @akumaseijin

    Thanks Aces!

Viewing 11 replies - 1 through 11 (of 11 total)
Skip to toolbar