WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] change page title using bbpress (3 posts)

  1. jaredmt
    Member
    Posted 3 years ago #

    I have buddypress installed, then I installed the bbpress forums that came with it. I like it however, I don't want to call it "forums". I wanted to call it "Group Topics".
    I can't just go to the Pages section and modify it because it isn't there.
    How would I change the Page title "Forums" to something else?

    I have tried this:

    function modification($title){
        //make modification
        $title = str_replace("Forums","GroupPosts",$title);
        return $title;
    }
    add_filter('wp_title','modification');

    it didn't do anything. I also tried this from a different website:

    add_filter('wp_title', 'set_page_title');
    
      $brand = array('name'=>'Brand Name');
    
      function set_page_title($orig_title) {
        global $brand;
        $title = 'Designer '.$brand['name'].' - '.get_bloginfo('name');
        //Here I can echo the result and see that it's actually triggered
        return $title;
      }

    also didn't do anything. I placed this code in a plug-in, then tried putting it in functions.php in the buddypress theme. Does anyone else have a suggestion? thanks for any help

  2. jaredmt
    Member
    Posted 3 years ago #

    OK well actually I have somewhat figured it out. I reallized I was modifying the wrong file.
    The file to modify is:
    plugins->buddypress->bp-themes->bp-default->header.php
    and
    plugins->buddypress->bp-themes->bp-default->forums->index.php

    in header.php:
    change
    title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?></a>
    to
    title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php //_e( 'Forums', 'buddypress' ) ?>Group Topics</a>

    and in index.php change:
    <h3><?php _e( 'Group Forums Directory', 'buddypress' ) ?>
    to
    <h3><?php //_e( 'Group Forums Directory', 'buddypress' ) ?>Group Topics Directory

    The links and everything is still the same. but in the navigation bar you now see "Group Topics" instead of "Forums" and in the Forums page, you see the title as "Group Topics Directory" instead of "Group Forums Directory".

    If anyone else can do this using a plug-in or if anyone else has any other ideas, please let me know, thank you.

  3. @mercime
    Volunteer Moderator
    Posted 3 years ago #

    The file to modify is:
    plugins->buddypress->bp-themes->bp-default->header.php
    and
    plugins->buddypress->bp-themes->bp-default->forums->index.php

    Please do not modify core files. Your revisions will be overwritten when you upgrade BuddyPress.

    Create a child theme of bp-default - http://codex.buddypress.org/theme-development/building-a-buddypress-child-theme/ - then copy over the files you need to revise from bp-default theme into your child theme folder following the directory structure of the file and make revisions in child theme.

    Change the URL slugs of BuddyPress components - http://codex.buddypress.org/extending-buddypress/changing-internal-configuration-settings/
    Then change the hardcoded links in your theme files

Topic Closed

This topic has been closed to new replies.

About this Topic