Changing the word 'Forum'
-
Hi,
I have just installed bbPress as a plugin, and want to change the word ‘Forum’ or ‘Forums’ to Newsroom.
Is there a way to easily do this?
I have looked into creating a child theme, and adding the bbPress files into my current theme, but all of this seems like overkill for just changing a word.
Any help or advice would be appreciated!
Thanks,
Sam
-
Change your forum base located here: http://www.yoursite.com/wp-admin/options-general.php?page=bbpress
from ‘forums’ to ‘newsroom’.
Uncheck the box next to ‘Prefix your forum area with the Forum Base slug (Recommended)’ if you don’t want the ‘forum’ in the URL as well. Just make sure you don’t run into any URL duplications.
Thanks for your reply varsitysmack, however that only changes the URL. It doesn’t change the H1 title on screen, or the breadcrumbs.
I ended up moving the bbpress files into the main theme directory and editing those. I also added a filter into my functions file to change the breadcrumbs.
It still seems like overkill, but it’s working for now.
Thanks,
Sam
Hi I want to remove the “Forums” link in the breadcrumbs and have it use the forum index page instead, could you post the code you used in functions.php to filter the breadcrumbs please?
Thanks in advance.
Here you go:
add_filter(‘bbp_get_forum_archive_title’, ‘forum_title’);
function forum_title() {
return ‘Noticeboard’;
}
Replace Noticeboard with any term you would like to change Forums to.
Hi Scoe, Thanks for the Code to alter the forums breadcrumbs. I was wondering if you could let me know which file you found the h1 located in? in order to change that? I’ve been looking everywhere.
I think you brought that file into your main theme directory to overwrite bbpress’s standard files?
Yep thats right. It is in the file archive-forums.php
Look for the line:
<h1 class=”entry-title”><?php bbp_forum_archive_title(); ?></h1>
Simply add the new name in the brackets e.g.
<h1 class=”entry-title”><?php bbp_forum_archive_title(‘New Name’); ?></h1>
It would be nice if there was an option in the admin to change the name of Forum. Maybe one day!
Sam
Hi Sam,
I had a hard time looking for the archive-forums.php, until I found it in the bbp-twentyten theme folder in bbp-themes folder. From my understanding I’m not using this theme for bbPress (or am I?)
I made the changes as you described and nothing takes effect. I’ve tried moving about the archive-forums.php into different areas, my main theme folder, the bbPress includes folder and others to see if I could find the right spot it needed to be in order to be called, but without luck.
Where do I need to place this file in order to have it activated or used by bbPress?
I also tried creating a new ‘theme’ for bbPress following the direction here.. https://codex.bbpress.org/legacy/themes-and-templating/
But it seems to call in my bbPress theme into my main WordPress theme area, and I don’t want to change th WP theme, I just want bbPress to use this file to generate it’s <h1> Title.
Any help would be awesome. Thanks for your time!
Hi, im testing bbpress. thanks
Bla
Bla
Ok! Good Bye!
I use this in my main theme page loop.
<?php if ( is_front_page() ) { ?>
// Main homepage H1.
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } else if (get_post_type() == 'forum') { ?>
// Forum H1
<h1 class="entry-title">Forum Title</h1>
<?php } else { ?>
// Fallback
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } ?>Let me now if this helps, good luck!
Thanks Lynq! I placed this bit of code into my page.php template file and it’s working like a charm. I didn’t know there was a ‘forum’ post type.
Great! Thanks so much for your help!
No problem, glad to be of help.
Hello all,
I ma trying to change just the page title for the Forums archive but not finding anything that is current and works.
Is there possibly a modern day version of @lynq ‘s code that works with WP 4.7.3 and bbpress 2.5.12?
Or am I doing something wrong?I’ve tried it and other variations gleaned from other posts like these:
functions.php
add_filter( ‘bbp_get_forum_archive_title’, ‘ddw_bbpress_change_forum_archive_title’ );
function ddw_bbpress_change_forum_archive_title() {
return ‘Your Forums Archive Title Here’;and
single.php
<?php if ( is_front_page() ) { ?>
<h1 class=”entry-title”></h1>
<?php } else if (get_post_type() == ‘forum’) { ?>
<h1 class=”entry-title”>Forum Title</h1>
<?php } else { ?>
<h1 class=”entry-title”><?php the_title(); ?></h1>
<?php } ?>The functions.php breaks WP and the single.php or forums.php does nothing.
Any pointers would be great,
Thanks
ping… anyone? the above post is correct. Both code options no longer work and second options generates a 500 error.
There is a lot in the above threads. What exactly do you want to change ?
– /forums in the URL ?
– /forum in the URL ?
– the title ‘Forums’ ?Pascal.
I really really recommend using the plugin called “WP Override Translation.” It works perfecty… you will then be able to change “Forum” to “Newsroom.”
Hope this helps because the plugin helped me so much!!!
- You must be logged in to reply to this topic.