I figured out how to do this and more, unfortunately I have found little documentation about using the extras folder in the BBPress template files and how really wonderful they are for advanced customization without the use of additional hooks.
EXTRAS Folder located at:
plugins/bbpress/templates/default/extras
To increase the amount of items you can customize in your bbpress theme, copy pages from out of here and paste them into the folder:
plugins/bbpress/templates/default/bbpress
In this case I needed to customize the individual topic page titles so I copied single-topic.php from out the extras folder pasted it into the bbpress folder. Then I opened up my theme’s page.php file and compared which style, entry-content, and container tags needed to be pasted into the single-topic.php page. I then exchanged bbp_topic_title() for bbp_forum_title() and styled it with my default WordPress styling tags and placed the topic title below it in a smaller more reasonable font than my site’s default .entry-title style.
The end result is the topic page displaying the forum name up at the top in the site-standard page styling with the topic title below it in a smaller reasonable font, as topics are generally WAY LONGER and should not be styled with the site’s main title styles by default.
Thanks Stephen maybe you are right.
Perhaps I was being too ambitious in hoping for a solution where the forum id can be used to access the forum name without me having to manually include the forum id and forum name in my code every time the user creates a new forum?
And in which database table can I find the forum names pray tell? It is not in wp_posts as far as I can see.
Thanks for the reply Stephen!
It seems to be a question that nobody can answer, or, I am not asking it correctly
Basically I want images that I attach to a topic post to appear in the [bbp-topic-index]. This is inline so that they appear on a home page style set up.
I have achieved this using BuddyPress and their activity shortcode, but don’t like the way in which only one forum can be used for all groups. I really want 1 group to have more than one forum attached to it.
If anyone can help with the above please let me know as it is driving me bonkers!!! Other forums such as IPS board can do it so there must be a way of adding a little code to get it to work.
Cheers,
The problem I cannot seem to solve is – where to get the name of the forum from? Without getting the name of the forum from somewhere in the database
The ONLY place the forum name exists is in the database :/
Just include the forum name and forum id into your logic, each topics `post_parent’ points to the parent forum id and then you can get the forum name at the same time.
SELECT * FROM wp_posts WHERE post_type = ‘forum’
I am using WordPress 3.6.1 with plugins Buddypress 1.8.1 and bbpress 2.3. I am trying to import the latest topics and replies from specific bbpress forums into specific wordpress pages.
I started with a Mysql query:
$query=”SELECT * FROM wp_posts WHERE post_type = ‘topic’ OR post_type = ‘reply’ ORDER BY post_date DESC”;
Then (in pseudo code) I planned to do the following:
// since forum is a parent of topic which is a parent of reply
// if post is topic get forum id
// if post is reply get forum id from the parent of the topic
//create an array of latest topics and replies associated with their forums
//print latest topics and replies for each forum to different wordpress pages.
The problem I cannot seem to solve is – where to get the name of the forum from? Without getting the name of the forum from somewhere in the database, my only option would seem to be to hardcode the forum id’s of each forum with their respective names. Which means every time a new forum is created this needs to be added in manually in the code. None of the tables I see in the wp database seems to contain the names of the different forums. Even if one of the other tables did contain it I am still not sure how I would then associate the forum id’s from the wp_posts table with the forum names from another table – presumably I would have to do some kind of join? Or maybe I am going about it completely the wrong way – is anyone able to help an inexperienced developer out of his depth navigate his way through this problem?
I checked the code of this plugin and it uses a filter on bbp_has_forums that tries to catch the $args from the original query but they are not transmitted through the filter in bbPress, so it uses the default ones and doesn’t take care of the post_parent argument. You should try to contact the author of the plugin, maybe he can alter the query without parsing all args again. The Codex says it is possible with $query->set().
Aaaah there we have it. I use Tehnik BBPress Permissions, too!
Now I have to see how to combine both. With deactivating your code works perfectly!
Thanks so much!!
Indeed, it looks like the new parent is not caught. It’s strange because in the code, the ID of the parent forum is correctly read as we can see in the <ul id="forums-list-17150" class="bbp-forums"> and is seen as a category. It seems like the post_parent argument is not used.
Have you (or your theme creator) applied a filter to bbp_has_forums ?
Can you check with an other theme ? (use https://wordpress.org/plugins/theme-test-drive/ if you don’t want to disturb your visitors)
This was exactly, what I needed –
but unfortunately it does not completely work for me.
I have 4 categories with subforum (some even sub-subforums) each.
The code displays now 4 times the WHOLE forum the usual way, just with the 4 different categories as headlines. Any idea? See here: http://deppheads.johnny-depp.org/forums/all-forums/
Do you have any idea? I copied your code 1:1. Somehow it doesn’t seem to catch the “new” parent forum for the subforums display. I guess.
I made the author and content one larger div in my single-loop-reply template. I wanted to span the author name/link and the content into one paragraph but was stymied by the added div id “d4p-bbp-quote-222” now that I paste that, it looks like a plugin added that. Isn’t that typically what the “d4p-….” is in the id/class name? a plugin?
So to answer the question, you are saying that there is nothing in the bbpress code itself that adds a “div” tag to the author or reply sections? If that is true, then I am off and running.
I don’t have any extra div in my content inside <div class="bbp-reply-content"> with normal filters.
The divs are not added by the bbp_reply_content, they are in the template file. The way you changed the template file, there’s no more div between author and content.
I think what may cause your issue are the paragraphs that are block elements. They are added by a filter but a lot of filters are used on bbp_reply_content and a lot of them are useful, you shouldn’t take all of them off. You can disable the one that adds the paragraphs by using this code in your functions.php :
remove_filter('bbp_get_reply_content','wpautop',40);
But keep in mind that you will not have any paragraph in your replies. You may want to make your own filter to edit only the first paragraph. Search the codex for the add_filter function and php doc for the preg_replace function.
Well, here are some ideas.
[glow=red,2,300]Glow[/glow] – What do we want to translate this to?
This is obviously a CSS Text-shadow without offset and with a little blur so the only thing that comes to my mind would be to convert this to a SHORTCODE and add in the documentation of the converter how to add it manually to the user’s wordpress install and to the theme CSS, since I can’t think of another way for this to work.
[shadow=red,left]shadow[/shadow] – What do we want to translate this to?
Same as the above but with a little offset to the 4 sides being able to pick a side in the shortcode and without blur.
[move]marquee[/move] – What do we want to translate this to?
JUST REMOVE IT, it’s ugly and old
[tt] – teletype? should this be a monospaced font?
YEP
And as for the smileys (extra space added so these render in code block)
;D 😉 ; - )
>:( 😡 : x
8) 😎 8 - ) unless a glasses smiley is added to WP
??? ❓ : ? :
::) 🙂 : ) I didn’t find what this smiley is supposed to be
:-[ 🙁 : - (
-X 😡 : - x
:-\ 😕 : - ? unless a skeptical smiley is added to WP
:-* 😉 ; - ) unless a kiss smiley is added to WP
:';( 😥 : cry :
So i’m setting up a site that will have a few different forums. I noticed that the forum-title (permalink) urls on the forum index directs to the forum and not the page that the forum is on.
A little less confusing, if you follow the set-up guide… create your forums and then the corresponding pages, and then post the forum shortcode on that page. So you’re left with two different urls. One for the forum you created and one for the shortcoded page.
Ideally, it would just be one forum page and one url. But then the problem you run into is that the forum post type is limited. You can’t use shortcodes and any textual content you add is shown inside the forum-info on the index.
Now I could just redirect the forum-title(index) url to the shortcoded page, which isn’t a big deal. I just wanted to see if anyone else did something a bit different.
WP 3.6.1
BBP 2.4
(buddypress 1.8.1 if that’s relevant)
I am trying to style my loop-single-reply template.
I am working on a copy placed in my wp_theme/bbpress directory…it is a copy of the default.
The problem is in the bbp reply DIV (that contains the author div and the content div). I need to get the content function to stop automatically adding “div” tags around the content (I want to use span tags).
I have tried to follow the rabbit trail through the files to figure out where these DIV tags are getting added, and the best I can figure is that there is a filter putting them in there.
I only need the actual content and so I have commented out the filter applied in includes/replies/template.php around line 525, and simple replaced it with return $content
That worked, but now bbcode is not working. Is there a way to stop this behavior without altering the bbpress plugin files (which will get destroyed during an upgrade)?
My forum is private, but I can set a public test one up if that will help…
Hi,
I upgrated bbpress to 2.4 and I see that quicktags-toolbar div is empty, no buttons
<div id="qt_bbp_reply_content_toolbar" class="quicktags-toolbar"></div>
It’s working fine with all other themes. Why it’s not visible only on 1 theme? Where it’s loaded?
The new WordPress 3.6.1 doesn’t have this option anymore. I know there are a few code hacks out there for changing the embed size, but those affect all the embeds on the site (including embeds on regular posts).
I was wondering: Is there a way to change the embed size for bbpress posts only?
Since I believe only the first rel=me link on a page counts there would be best to use topic lead:
add_filter( 'bbp_show_lead_topic', '__return_true' );
…by doing so each page will be considered authored by the topic creator even if its paged.
@martin_c You didn’t specify exactly where to put that.
Looks like the last thing needed now for SMF v2.x is converting any custom HTML/BBCodes for topic/reply content.
From my tests the following BBCodes are converting fine:
[url]
[img]
[email]
[b] – bold
[i] – italic
[u] – underline
[s] – strikethrough
[left]– left aligned
[center] – centre aligned
[right] – right align
[font=fontname] – fonts
[color=colorname] – color name
[color=#FFFFFF] – color hex value
[sup] – superscript
[sub] – subscript
[quote] – quote
The following need to be converted by regex strings during import:
[quote author=SMF Admin link=topic=9.msg30#msg30 date=1380330453] – Quoting a post, username, post id & date support needs to be added.
[pre] – pre formatted text
[code] – partially working
[size=x] – font size
[glow=red,2,300]Glow[/glow] – What do we want to translate this to?
[shadow=red,left]shadow[/shadow] – What do we want to translate this to?
[move]marquee[/move] – What do we want to translate this to?
[tt] – teletype? should this be a monospaced font?
[table], [tr] & [td] – tables and closing tags
[list] – unordered list
[list=decimal] – ordered list
[li] – list item
[hr] – horizonal rule
SMF Smilies Working (extra space added so these render in code block)
- 🙂
: )
- 😉
; )
- 😀
: D
- 🙁
: (
- 😮
: o
- 😛
: P
SMF Smilies not working
- ;D
;D
- >:(
>:(
- 8)
8)
- ???
???
- ::)
::)
- :-[
:-[
- -X
:-X
- :-\
:-\
- :-*
:-*
- :’;(
:'(
What should the above be converted to with the smilies included with WordPress?
https://codex.wordpress.org/Using_Smilies
Have I missed any BBCode and/or other ‘stuff’ that isn’t getting converted correctly during the SMF import?
Glad it helped 🙂
With the dropdown list, even though it is slow you can type the username to get you there quicker without relying on the mouse for 100%, once the dropdown is showing start typing the name, you have to type fast to get more than two or three characters but it is helpful.
The other option you have is to modify the entries directly in phpMyAdmin
UPDATE wp_posts SET post_author = 123 WHERE post_author = 789;
Where 123 is the new user id you want to attribute to the old user id 789
is_bbpress() is what your looking for.
I have installed bbPress forums into my Genesis/Dynamik Website Builder parent/child theme and it works nicely. However I have some confusion on how to alter the CSS of the bbPress forums.
The general site settings have a black background with white font used. The white font is displaying on the bbPress forum pages, but not the black background.
This will be a question for those who are familiar with Genesis/Dynamik Website Builder.
I have put the following code into the Genesis/Dynamik Custom CSS field but it still displays with the default light background colors in bbPress posts.
#bbpress-forums div.odd, #bbpress-forums ul.odd {
background-color: #222222;
}
#bbpress-forums div.even, #bbpress-forums ul.even {
background-color: #444444;
}
Any assistance would be greatly appreciated.
Thanks,
Jason Davis
I have a theme-specific issue affecting the Skeleton WordPress theme. Basically, the front-end topic/reply editor loads the entire source code of the page.

Any ideas?
Found out –
you can simply use Widgets inside your template.
I also installed the tehnik-bbpress-permissions plugin to not show the hidden forums topics and put this into my template:
<?php the_widget( 'Tehnik_BBP_Replies_Widget', $instance, $args ); ?>
This should work with the default BBP Replies Widget, too (just need to find out the name of it)
Will try a bit more customization today with an eye on https://codex.wordpress.org/Function_Reference/the_widget
Another possibility is manually:
<?php do_action( 'bbp_template_before_topics_index' ); ?>
<?php if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 5 ) ) ) : ?>
<?php bbp_get_template_part( 'bbpress/loop', 'recent-topics' ); ?>
<?php else : ?>
<?php bbp_get_template_part( 'bbpress/feedback', 'no-topics' ); ?>
<?php endif; ?>
<?php do_action( 'bbp_template_after_topics_index' ); ?>
Sage words? Nope 😉
I had a quick look around https://wordpress.org/plugins/search.php?q=bulk+users and nothing really stood out.
The most users I have played around with is ~4,000 and that was too many also for the WordPress admin dashboard. I ended up doing everything I needed directly in phpMyAdmin with SQL queries.
A way to delete users an reattribute their posts/topics/replies to another user (mainly for a handful of folks who already had accounts on the WordPress side before migrating vBulletin over)
With only a handful of these use WordPress’ built in user delete tool, when you select to delete a user you have the option to delete all posts (including topics & replies) or keep them an attribute them to another user.
A way to “nuke” users who have spammed the forums. This would delete the user as well as all of their topics and replies.
First you are going to have to find the spam and record each user id associated and this is painful indeed! I am not to sure on the specifics but there probably is a way to get Akismet to check all of this for you.
A way to purge all users with no forum topics or replies (or posts, for that matter).
I think the quickest way for this would be in phpMyAdmin directly using an SQL query.
The query (Good to verify this stuff before you delete them)
SELECT ID FROM wp_users
WHERE ID NOT IN (SELECT DISTINCT post_author FROM wp_posts);
The delete queries (Any user without a post gets deleted)
DELETE FROM wp_usermeta WHERE user_id NOT IN (SELECT DISTINCT post_author FROM wp_posts);
DELETE FROM wp_users WHERE ID NOT IN (SELECT DISTINCT post_author FROM wp_posts);