Skip to:
Content
Pages
Categories
Search
Top
Bottom

Buddypress Admin Bar/Menu Changes


  • jcampbell120
    Member

    @jcampbell120

    Hi, Hopefully somebody will be able to help me, I’m pulling my hair out!!!

    I currently have a buddypress installation on my site. I have the admin bar at the top and then my sites main navigation using wordpress custom menus.

    I would like to move all of the links into my sites current navigation and remove the buddypress navigation bar. I do not want to do it the otherway round i want rid of the admin bar to use my own. I have seen countless examples to do it that way but none the way I want. It’s driving me insane!!! Any help would be greatly appreciated. I don’t mind doing any sort of coding, just a point in the right direction would work. It needs to be dynamic as well, so work in the same way as the current admin bar.

    I have the idea of:

    
    if (user logged in) false {
    <li>Log In</li>
    <li>Sign up</li>
    }
    
    if (user logged in) true {
    <li> all other menu items blah blah....
    
    }

    Anybody help?

    Thanks,
    JC.

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

  • jcampbell120
    Member

    @jcampbell120

    Nobody wants to do this? Really?!?!


    @mercime
    Keymaster

    @mercime

    @jcampbell120 99.9% of those who help out at buddypress.org are volunteers and what you’re asking for cannot be done within 10 minutes. If you’re not being helped within 25 hours, feel free to bump, but no arrogance please. In the meantime, check out Michael’s method which could be helpful to you http://www.michaelkuhlmann.com/tutorials/customizing-admin-bar/


    jcampbell120
    Member

    @jcampbell120

    Hi, I wasn’t expecting somebody to just write a couple of hundred lines of code for this to work. Just wanted to bat around a few ideas with some like minded people is all. Appreciate the link, very useful and it gives me something to work on. Just thought that more people would want this sort of implementation on their site.

    cheers.


    jcampbell120
    Member

    @jcampbell120

    Managed to get it to work. Just creates a simple list, you can edit the css to create a drop down menu etc..

    <ul id="menu-home" class="menu-members">
    <li><a href="#">Members Area</a>
    <ul class="sub-menu-members">
    <?php global $bp;
    if ( is_user_logged_in() == false) {
    
    echo'<li><a>root_domain . '/wp-login.php?redirect_to=' . urlencode( $bp->root_domain ) . '">' . __( 'Log In', 'buddypress' ) . '</a></li>';
    
    if ( bp_get_signup_allowed() == true ) {
    echo'<li><a href="' . bp_get_signup_page(false) . '">' . __( 'Sign Up', 'buddypress' ) . '</a></li>';
    }}
    ?>
    
    <?php
    if ( is_user_logged_in() == true) { ?>
    <li><a href=&quot;profile/">Profile</a></li>
    <li><a href=&quot;messages/">Messages</a></li>
    <li><a href=&quot;Leagues/">Groups</a></li>
    <li><a href=&quot;friends/">Friends</a></li>
    <?php echo'<li><a href="' . wp_logout_url( site_url() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>' ?>
    
    </ul>
    </li>
    </ul>

    Ive added bp-custom.php file and all works fine. Im just trying to wrap my head around getting the navigation to appear before the log in and sign up links.

    Any ideas? Im sure its something so simple and Im just not seeing it.

    And of course I figured it out.

    I just created a new action and placed it before do_action( ‘bp_adminbar_menus’ ); and outside of the ul.


    @mercime
    Keymaster

    @mercime

    It happens, the answer comes up just after you post in the forums :-) Have a good weekend.

    Seems like every time for me! Have a great one too!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Buddypress Admin Bar/Menu Changes’ is closed to new replies.
Skip to toolbar