Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change Group Tab Titles


  • Pisanojm
    Participant

    @pisanojm

    Just a FYI for anyone wanting to change the Tab Titles found on each Single Group. I wanted to do this because the HOME tab in the group seemed confusing,so I wanted to change it to “Group Home” and also “Group’s Forum” and “Group’s Admin.”

    To do this you will need to modify the bp-groups.php file found in the buddypress directory…

    Navigate to line 196 or so, and change to this (the only thing you are change is the Text “Home” to “Group Home”:


    /* Add the "Home" subnav item, as this will always be present */
    bp_core_new_subnav_item( array( 'name' => __( 'Group Home', 'buddypress' ), 'slug' => 'home', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_home', 'position' => 10, 'item_css_id' => 'home' ) );

    You can do the same for the next 5 items as well.

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

  • r-a-y
    Keymaster

    @r-a-y

    Not a great technique because when you upgrade BP, all your changes will be gone!

    I’d rather do something like this in my theme’s functions.php:


    function my_bp_group_overrides() {
    global $bp;

    $bp->bp_options_nav = 'Group Home';
    $bp->bp_options_nav = 'Group Forum';
    $bp->bp_options_nav = 'Group Admin';
    }
    add_action('get_header', 'my_bp_group_overrides');


    Pisanojm
    Participant

    @pisanojm

    Ray,
    i can put this code anywhere? when I update theme Ill still have to update code… how often is the default buddy press theme updated in new releases of bp?


    Pisanojm
    Participant

    @pisanojm

    Anywhere in the functions.php…


    r-a-y
    Keymaster

    @r-a-y

    If you built a child theme from the default BP theme, then your changes will never get wiped out.

    Something I forgot to mention last night is you can also use a customized language file to make changes to the tab names:
    https://codex.buddypress.org/how-to-guides/customizing-labels-messages-and-urls/


    Pisanojm
    Participant

    @pisanojm

    @r-a-y

    Thanks. I have had some problems grasping the concept of the child theme… I’ve read a number of codex articles on it, but still don’t get it. Is there a more easy to understand article you can point me to? Again. Thanks for your help with all of this.


    r-a-y
    Keymaster

    @r-a-y

    A child theme is basically a stylesheet with a tag telling WordPress to use another theme as its foundation.
    Then you can inherit all the templates that foundation theme uses and you can also override these templates in your own child theme.

    Please read the article I linked to and start reading from the “Let’s start building” section.
    If you have any questions about it, please list them.


    IAMTHELAB
    Participant

    @faberuna

    What if I just want to change the Group tab to something else? In my case the Latin word ‘Una’. Where would I put the code? http://www.unafied.com


    r-a-y
    Keymaster

    @r-a-y

    Use a language file.

    Read the post I made just a few posts above.


    TimCarey
    Participant

    @timcarey

    I turned this code into a plug in.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Change Group Tab Titles’ is closed to new replies.
Skip to toolbar