Hi,
Check out https://codex.bbpress.org/getting-started/importing-data/import-forums/
If your source forum is not in the list, there is a custom importer.
Let us know if it works or not !
Pascal.
Hello
I change the loop-forums to get something like this =
Category 1
sub category 1.1
sub category 1.2
sub category 1.2.1
Category 2
sub category 2.1
sub category 2.2
It works like a charm on the index page but I click on category 1 (or category 1.1 or another) I get :
Category 1
**** nothing *****
Category 1
sub category 1.2.1
What I want is : when i click on category 1 etc….
Category 1
sub category 1.1
sub category 1.2
sub category 1.2.1
Can someone help me?
The code :
<?php
/**
* Forums Loop
*
* @package bbPress
* @subpackage Theme
*/
?>
<?php do_action('bbp_template_before_forums_loop'); ?>
<?php while ( bbp_forums() ) : bbp_the_forum();?>
<?php
/* We print the header only if we want to show a category or if it's the first item of a no-parent forum list */
if (bbp_is_forum_category() OR ! $bbp_forums_noheader) {
?>
<ul id="forums-list-<?php bbp_forum_id(); ?>" class="bbp-forums">
<li class="bbp-header">
<ul class="forum-titles">
<li class="bbp-forum-info">
<?php if (bbp_is_forum_category()) { ?>
<a class="bbp-forum-title" href="<?php bbp_forum_permalink(bbp_get_forum_parent_id()); ?>">
<?php bbp_forum_title(bbp_get_forum_parent_id()); ?>
</a>
<?php } else {
_e('Forum', 'bbpress');
} ?>
</li>
<li class="bbp-forum-topic-count"><?php _e('Topics', 'bbpress'); ?></li>
<li class="bbp-forum-reply-count"><?php bbp_show_lead_topic() ? _e('Replies', 'bbpress') : _e('Posts', 'bbpress'); ?></li>
<li class="bbp-forum-freshness"><?php _e('Freshness', 'bbpress'); ?></li>
<li class="bbp-forum-freshness-avatar"></li>
</ul>
</li><!-- .bbp-header -->
<?php } ?>
<li class="bbp-body">
<?php
/* If the forum is a category, we're gonna make another loop to show its subforums and sub-subforums as if those were forums */
if (bbp_is_forum_category()) {
$temp_query = clone bbpress()->forum_query;
bbp_has_forums('post_parent=' . bbp_get_forum_id());
while (bbp_forums()) : bbp_the_forum();
bbp_get_template_part('loop', 'single-forum');
endwhile;
bbpress()->forum_query = clone $temp_query;
}
else /* Otherwise, we print the forums the normal way */ {
bbp_get_template_part('loop', 'single-forum');
$bbp_forums_noheader = 1; /* This prevents the header part to be printed again on next post in the loop */
}
?>
</li><!-- .bbp-body -->
<?php
/* Prints the footer only if :
- it's a category
- or if it's the last forum of a no-parent forum list
- or if the next forum in the loop is a category */
if (bbp_is_forum_category()
OR ( bbpress()->forum_query->current_post + 1) == bbpress()->forum_query->post_count
OR bbp_is_forum_category(bbpress()->forum_query->posts[bbpress()->forum_query->current_post + 1]->ID)) {
?>
<li class="bbp-footer">
<div class="tr">
<p class="td colspan4"> </p>
</div><!-- .tr -->
</li><!-- .bbp-footer -->
</ul><!-- .forums-directory -->
<?php unset($bbp_forums_noheader); /* Needed if we have 2+ no-parent forums with at least 1 category between them */
}
?>
<?php endwhile; ?>
<?php do_action('bbp_template_after_forums_loop'); ?>
just looked,
The foreach loop produces
class="bbp-author-avatar"
class="bbp-author-name"
class="bbp-author-role"
so
class="bbp-author-"
is never matched as you have ” at the end
function hw_get_reply_author_link($link_class) {
$link_class = preg_replace('/ class="bbp-author-/',' class="myclass-',$link_class);
return $link_class;
}
add_filter('bbp_get_reply_author_link','hw_get_reply_author_link');
will get you
class="myclass-avatar"
class="myclass-name"
class="myclass-role"
if that’s what you are after
Hello
WP 4.7.3 , BBPress 2.5.12, twentyten theme.
I doublechecked with this page. My forum features for embed videos do have the box ticked.
Auto-embed Links
Scroll to the very bottom for the video link that doesn`t embed on my website.
Digging into Petition E411
Hi,
That will need some programming probably. The starting point has nothing to see with bbPress, so you could refer to these examples as this is all about the WP admin bar: https://codex.wordpress.org/Function_Reference/add_node
Hey Guys,
maybe you can help me. I registrate now a new subdomain on my Homepage. I installed there a new version of Wp. After them i download the bbpress Plugin and everything works fine in the installation. Now when i go to “Forum” it jumps zu a empty page that says “The site http://www.gamingtournamentleague.com does not work”. Wenn i go the “New Forum” i can add a Forum but wenn i go than to preview it shows me again “The site http://www.gamingtournamentleague.com does not work”.
I changed the theme, i also deleted the plugin and i use shortcodes but nothing works…
Theme: Twenty Eleven
WP: 4.7.3
bbpress: 2.5.12
My Subdomain: http://www.gamingtournamentleague.com/register
@guybrushpixelwood – thanks for posting this, that is really useful.
Howevber it will get overridden by bbpress updates, so either have that file in a bbpress folder in your child theme
Functions files and child themes – explained !
or put this function in your child theme’s functions file
add-action ('bbp_theme_after_reply_admin_links' , 'gbpw_add_ratings' ) ;
function gbpw_add_ratings () {
if(function_exists('the_ratings')) {
echo '<span class="bbp-admin-links">' ;
the_ratings();
echo '</span>' ;
}
}
hmmm….you can add lots of css to lots of stuff. suspect you’d need to invest some time in sau adding firebug for firefox and using that to examine and change css elements.
This may also help
bbPress Styling Crib
If somebody stumble upon the same problem here is a solution to get Wp PostRatings Plugin Stars into bbpress topics:
wp-content/plugins/bbress/templates/default/bbpress/loop-single-reply.php <–
Search for the line
<?php bbp_reply_admin_links(); ?>
and place this under it:
<span class="bbp-admin-links">
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
</span>
😀
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
Oh, code located in /includes/replies/template.php, line 1241
I added some custom CSS to my theme which did the trick.
.bbpress #sidebar {
display:none;
}
body.bbpress div#content{
width:100%;
}
Might help you.
where does that source code sit – file and line please
Tho still trying to figure out how to replace default classes.
Code in BBpress:
// Link class
$link_class = ' class="bbp-author-' . esc_attr( $r['type'] ) . '"';
// Add links if not anonymous and existing user
if ( empty( $anonymous ) && bbp_user_has_profile( bbp_get_reply_author_id( $reply_id ) ) ) {
// Assemble the links
foreach ( $author_links as $link => $link_text ) {
$link_class = ' class="bbp-author-' . $link . '"';
$author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', esc_url( $author_url ), $link_title, $link_class, $link_text );
}
Hook:
function hw_get_reply_author_link($link_class) {
$link_class = preg_replace('/ class="bbp-author-"/','/ class="myclass" /',$link_class);
return $link_class;
}
add_filter('bbp_get_reply_author_link','hw_get_reply_author_link');
Cant make this work. Well output itself works as should, but it doesn’t replace bbp-author- to myclass. Can you tell me what’s wrong with it?
In BBPress if no role is found, it defaults to Member. I found that much in the code.
I solved it though. It wasn’t working as long as my code was in my theme’s functions.php. I had to actually add it to a custom plugin for it to work. Not sure why this was.
Hello,
I added a function in functions.php to add some user roles.
They are now available, but when I set them on a user, their user title on posts only says “Member”, instead of the name I set.
Here’s my code:
function add_custom_role( $bbp_roles ) {
$bbp_roles['neophyte'] = array(
'name' => 'Neophyte I°',
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
);
$bbp_roles['adept'] = array(
'name' => 'Adept II°',
'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
);
return $bbp_roles;
}
add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );
How can I get the desired names to actually show up underneath those users?
Hi,
You might be better off asking in the support forum of that plugin (https://wordpress.org/support/plugin/addquicktag), but you will have to specify what does not work…
– Do you see the custom type ‘topic’ and ‘reply’ in the settings of the plugin ?
– Do you see the quicktags when you are adding a topic/reply ?
– When you click on the button or in the dropdown, does some code show ?
Because just a ‘it does not seem to work’ is very hard to give the correct support.
Pascal.
Goede middag Jos,
The translation is done centrally and changing it would change it for everybody in the (Dutch speaking) world. If you think it should be changed, feel free to join the #polyglots channel on the Dutch local slack that you can find on https://make.wordpress.org/polyglots/handbook/about/teams/local-slacks/
If you want to change it only for your own website, I would just change the width adding some extra CSS like:
.bbp-login-form label {
width: 150px;
}
(you might need the !important to make it work)
Pascal.
Hello,
I would like to include the following under a custom coded section of a forum topic. I would like to include all Moderators or Keymasters that have participated via a reply in a topic. I’m terrible with SQL and couldn’t find another way to do this. Any suggestions?
Thanks.
One Month. Still i did not get solution. Any MyBB Intelligent is there ? Help me Please
Repair any missing information: ContinueConversion CompleteNo threaded replies to convertNo anonymous reply authors to convertNo replies to convertNo favorites to convertNo topic subscriptions to convertNo topic tags to convertNo closed topics to closeNo super stickies to stickNo stickies to stickNo anonymous topic authors to convertNo topics to convertNo forum subscriptions to convertNo forum parents to convertNo forums to convertNo passwords to clearNo users to convertStarting ConversionRepair any missing information: Continue
WordPress database error: [Specified key was too long; max key length is 1000 bytes]
CREATE TABLE wp_bbp_converter_translator ( meta_id mediumint(8) unsigned not null auto_increment, value_type varchar(25) null, value_id bigint(20) unsigned not null default ‘0’, meta_key varchar(255) null, meta_value varchar(255) null, PRIMARY KEY (meta_id), KEY value_id (value_id), KEY meta_join (meta_key(191), meta_value(191)) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
No data to cleanStarting ConversionRepair any missing information: Continue
WordPress database error: [Specified key was too long; max key length is 1000 bytes]
CREATE TABLE wp_bbp_converter_translator ( meta_id mediumint(8) unsigned not null auto_increment, value_type varchar(25) null, value_id bigint(20) unsigned not null default ‘0’, meta_key varchar(255) null, meta_value varchar(255) null, PRIMARY KEY (meta_id), KEY value_id (value_id), KEY meta_join (meta_key(191), meta_value(191)) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
No data to cleanStarting ConversionRepair any missing information: ContinueConversion CompleteNo threaded replies to convertNo anonymous reply authors to convertNo replies to convertNo favorites to convertNo topic subscriptions to convertNo topic tags to convertNo closed topics to closeNo super stickies to stickNo stickies to stickNo anonymous topic authors to convertNo topics to convertNo forum subscriptions to convertNo forum parents to convertNo forums to convertStarting Conversio
It happens because you are creating two pages with the same url… I mean, bbpress has a root and also shortcodes, so you can create an index forum or main page forum using shortcodes but they always going to the root (/forums) and you also have a page called (/forums). You can see what I said if you try breadcrumbs from the topic to the root…
Hello,
I created a custom page for my bbpress forum index.
I called it “/forums” (“forums” also my forums root slug).
However, I can’t seem to customize the page in anyway with my sites page template.
If I change the page’s permalink to something else (ex: “/forums2”), I’m able to customize it.
What am I doing wrong here?