Skip to:
Content
Pages
Categories
Search
Top
Bottom

how to remove a page from buddypress nav menu


  • porkchops1987
    Member

    @porkchops1987

    I am working on a project at the moment, and buddypress is proving amazing. I just have one problem. I cant seem to remove a page from the navigation menu. At the moment it says –

    Home
    Activity
    Members
    Groups
    Forums
    Jobs – Added by me (want to keep)
    About – Added by me (want to keep)
    Contact – Added by me (want to keep)

    I want it to say –

    Home
    Members
    Forums
    Jobs – Added by me (want to keep)
    About – Added by me (want to keep)
    Contact – Added by me (want to keep)

    Any help would be greatly appreciated thank you so much!

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

  • @mercime
    Participant

    @mercime

    @porkchops1987 It can be as easy as opening up your theme’s header.php and delete the other links you don’t need. What theme are you using?


    porkchops1987
    Member

    @porkchops1987

    Im using one called Citizen Kane. It is easy to ass pages to the nav menu because the creator must have made it that they join on the end of the nav items (buddypress) however there is no option to delete buddypress pages etc. I have tried going into the header.php and commenting out the menu items. Im not sure. Going to have another check maybe I did not comment out the – Buddypress header.php part & – the Citizen Kane header.php. Thanks for your prompt reply btw


    @mercime
    Participant

    @mercime

    delete activity
    `
    <li class=”selected”>
    <a href="//” title=””>

    `

    and groups link

    `<li class=”selected”>
    <a href="//” title=””>
    `

    Or, you might consider changing main navigation to a custom menu http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus


    porkchops1987
    Member

    @porkchops1987

    Thanks for your reply i started with a new theme and was able to just comment them out. I have now coded in one of the pages where i want it (in front of members) and i have used a plugin to remove the WordPress created page (of same name). However now when i select it it does not indicate on the menu as being the currently selected page.

    ( bp_is_page( BP_PROJECTS_SLUG ) ) : ?> //i think this statement is wrong because —->

    THIS DIDNT WORK PROPERLY I HAD TO CODE IN LINK MANUALLY
    <li class=”selected”>
    <a href="//” title=””>

    MANUALLY
    <li class=”selected”>
    <a href="/projects/” title=””>

    ( bp_is_page( ‘projects’ ) ) : ?>

    ( bp_is_active( ‘projects’ ) ) : ?>

    i tried all these conditions but it still doesnt work.

    i have also used this code in my functions.php (its from another forum post, maybe i havent used it right?) —->

    <?php

    /*Define slugs*/
    define(‘BP_PROJECTS_SLUG’, ‘projects’); /* this will show up as http://yourdomain.com/projects */

    /*Add slug as a root component*/
    function page_setup_root_component()
    {
    bp_core_add_root_component( BP_PROJECTS_SLUG );
    }
    add_action( ‘plugins_loaded’, ‘page_setup_root_component’, 2 );

    /*Show defined slug*/
    function bp_show_page() {
    global $bp, $current_blog;

    if ( $bp->current_component == BP_PROJECTS_SLUG && $bp->current_action == ” ) {
    bp_core_load_template( ‘projects’, true ); /*replace example with the name that of the template you upload*/
    }
    }
    add_action( ‘wp’, ‘bp_show_page’, 2 );

    /*For extra functionality you can add a title for that page*/
    function page_titles( $title, $b ) {
    global $bp;

    if ( $bp->current_component == BP_PROJECTS_SLUG && $bp->current_action == ” ) {
    $title = __( ‘Projects’, ‘buddypress’ ); /*change Example with what you want the title of your page to be*/
    }
    return $title;
    }
    add_filter( ‘bp_page_title’, ‘page_titles’, 10, 2 );

    ?>


    porkchops1987
    Member

    @porkchops1987

    Some of code in the post got erased sorry!


    @mercime
    Participant

    @mercime

    Go to pastebin.com and paste the code there. Click submit and post the generated URL here. Cheers.


    porkchops1987
    Member

    @porkchops1987

    I have to go now, but I will post later on when I get back to this. Thanks for your help so far :) really appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘how to remove a page from buddypress nav menu’ is closed to new replies.
Skip to toolbar