Skip to:
Content
Pages
Categories
Search
Top
Bottom

Where do I Change Page Titles?


  • Cassey’s Designs
    Participant

    @casseysdesigns

    Hiyya,

    My Info :
    WordPress Version 3.7.1
    BuddyPress Version 1.8.1
    Site : duffitness.com/coachportal/ – this site is private and only accessible by registered coaches, however I have attached an image of the title I am referring to.

    I want to change the titles of my buddypress pages. For example: I want to make “Sitewide Activity” read “Community Lounge” on that page. I have used my own page with the title Community Lounge and directed the activity feed to that page rather than buddypress’s default activity page. I have explored the code and found where it is but I have been unable to get the desired effect thusfar. Is there a specific file I need to access to change these titles?

    Page Title Screenshot

    Any help is greatly appreciated!! Thanks,
    Cassey

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

  • Matt McFarland
    Participant

    @matt-mcfarland

    Hi there,

    Did you try creating a blank page called “Community Lounge”, then going to the buddypress settings dashboard, and selecting that blank page you just made for the activity stream?

    If it’s still spitting out “Sitewide Activity” – then here’s what you can do:

    THE LONG WAY:
    Step 1: create a blank folder in your theme called “buddypress”
    Step 2: copy all the files over from wp-content/plugins/templates/bp-legacy/ to your new buddypress folder.
    Step 3: jump to your new buddypress folder. go to yourtheme/buddypress/activity/index.php and you should see something like “<h3><?php _e( ‘Sitewide Activity’, ‘buddypress’ ); ?></h3>”
    Step 4: change it 🙂

    The SHORT WAY:

    Hacking time! Right click on Sitewide activity, and use your inspector in chrome or firefox, what ID or class is it? set that to display: none, then throw in your own title above that via html.

    You can probably do this using some filter or action hook, but I dont know much about those.


    Cassey’s Designs
    Participant

    @casseysdesigns

    Hi Matt,

    Thank you for your help! I can hack it, but I’d prefer not to if I can avoid it.
    I have created blank pages and assigned them, no dice 🙁 …
    I have my buddypress child theme files, and checked the index files and that’s where the action for the header text is, but I need the actual action that will give me “<h3><?php _e(‘Sitewide Activity’, ‘buddypress’); ?></h3>”

    I am looking for the file that holds actions like the following:
    <?php do_action( ‘bp_before_directory_members_page’ ); ?> and
    <?php do_action( ‘bp_before_directory_activity’ ); ?>
    I assumed that would be buddypress-functions.php but I had no luck searching that file…

    Thanks again for your help, if I find the file needed I’ll post here in case anyone else needs to know…
    A little more frustration may lead to hacking though, lol.


    Matt McFarland
    Participant

    @matt-mcfarland

    Hi Cassey,

    When I look in my buddypress folder, I see <?php do_action( ‘bp_before_directory_activity’ ); ?> is in /activity/index.php

    I see <?php do_action( ‘bp_before_directory_members_page’ ); ?> is located in /members/index.php

    I hope this helps!

    BP can be very strange sometimes. Did you copy bp-legacy over? One of the things I did to make changes in the beginning was turn files into blank pages to see what happened. Also there is a document that may help: https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/

    that doc explains how BP looks for files and grabs info. I had a huge problem took a long time to find it and it was very simliar to yours (I had to find the title of members pages as it was breaking the pages for some reason, found it by copying the bp-legacy over and guessing which files they were haha, took forever, hope you find this faster than I did.)


    Matt McFarland
    Participant

    @matt-mcfarland

    You may want to try creating a blank page that is top of the template hierarchy. For example you could throw in a page.php in activity/single or in /activity and see what happens.


    Cassey’s Designs
    Participant

    @casseysdesigns

    I have found the actions file where the do_actions are called from, its in the main buddypress files bp_activity > bp-activity-actions.php…

    I would just remove the action and code in the title I want but I’d like to be able to re-use the theme I am working on… Ill try playing with the template hierarchy and actions and see what I come up with.

    Thanks Matt!


    Matt McFarland
    Participant

    @matt-mcfarland

    You’re welcome!

    I think actions have merit, I just am not used to using them. The theme I’m working on is at http://www.hvac-hacks.com – and I love to just copy the bp files over and customize them myself. That being said, I’m annoyed right now because bp was written in such a way that makes it hard to customize without using actions/filters LOL.

    I’m trying to figure out how to access raw data from BP without using them. Kind of like how you can do that using the $post->array . Just wish bp was more like wp sometimes. Maybe I’m missing stuff, did post something, this is off topic. anyway, good luck hope you get it!


    streetprep
    Participant

    @streetprep

    You can change it in the “bp-activity-screens.php” file.


    Cassey’s Designs
    Participant

    @casseysdesigns

    Thank you streetprep!! That worked perfectly…

    Since this is in the plugin files rather than the template files I assume that I will have to update this anytime I update buddypress, correct?


    streetprep
    Participant

    @streetprep

    Yes.


    Graham
    Participant

    @graham-washbrook

    In vast preference to changing the core files ( where any changes that you make will be lost on updates ) you should look at creating a language file with your custom labels in

    Customizing Labels, Messages, and URLs

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Where do I Change Page Titles?’ is closed to new replies.
Skip to toolbar