Thanks @netweb for the comments. I worked a LONG time on that home page layout. I posted a rather lengthy commentary here describing how I got it to work, but sadly that post never appeared.
So it does work if I clean off bbp_reply_id(); but I guess I could save a couple of lines of code by using bbp_get_reply_id();.
How about using bbp_get_reply_id ? I think that one is not echoing…
Correct 🙂
Throughout much of bbPress this is true, more often than not if there is a function bbp_some_thing there will be a sister function bbp_get_some_thing, the functions with bbp_get_ will always just get the value for you to use, and the functions without it will echo the returned value.
Ok the issue is simple. Inserting a topic using the code I have shown I can get the correct child-parent relationship into a forum. However the same topic shows up in a different forum other than the parent and that feels like a bug. Without the code, there is no problem at all if the topic is created from the front end.
I suspect it is a theme issue.
But if you have created a page and put the shortcode in and that works, then why is this not the solution?
ps whilst your link is probably fine, MacAfee advised me that it was a suspect site, so I didn’t view your png
sorry but I am not sure what exactly the issue is.
It would seem that
Without your code you have problem a
and with your code you have problem b
is that it, AND IF SO can you state your problem without the code you added?
Hi,
Just some ideas:
– Did you try with a standard WP theme (to make sure it’s not your theme) ?
– Do you have more then 1 shortcode on that page ?
If the site is public, a URL would be great…
Pascal.
Hi all,
I have used the shortcode plugin to show the 5 most recent postings on another page. I want to edit the styling of this so it is more just the text rather than excess spacing. Is there a way to set this up?
I don’t want the forum header to show, I don’t want it to be so spaced, I don’t want the Viewing 2 topics view to show. So just the title of the topic, who it was started by, when it was added and preferably when it was last posted.

@robin-w: thank you for your reply. I’m sure it could work. However using this solution forces me to create a function for every language I add.
@casiepa: Goeiemorgen, daar zijn we weer! Thanks for helping out. I have achieved a lot of what I want but the breadcrumbs remains. (for reference, see this topic on WPML: https://wpml.org/forums/topic/multiple-site-languages-but-just-a-bbpress-forum-in-english/).
As a result of this thread I have an English forum AND a Dutch page displaying the forum with a shortcode with only one set of topics. Exactly what I want.
For the breadcrumbs I tried to create a solution with an onclick event and then navigate back in the history but that is not reliable. When a user is entering a topic from, let’s say a google search result page and then clicking the breadcrumb link they are send back to the google page.
I imagine something like this:
The English page for the forum has the slug: supportforum (for example)
The Dutch page for the forum has the slug: helpforum (for example)
On the forum index page no breadcrumbs are needed.
On the topics page I only want a link back to the forum index for the appropriate language.
So the ‘solution’ must not link back to the forum slug but to the page where the index lives.
I have absolutely no idea how to achieve this.
The outputted link has to be something like this:
http://www.my-site.com/forumpage-slug/
For the other languages:
http://www.my-site.com/language-code/localized-forumpage-slug
In my case English is the default language and Dutch is the translation.
The urls should be:
http://www.my-site.com/supportforum/ -> for the default English language.
and
http://www.my-site.com/nl/helpforum -> for the Dutch language forum page.
and
same way for every other language added.
I hope this description make sense.
HTH
Regards,
Adri
Hi. I recently installed bbPress along with the Material Gaze theme. I’m having a problem – the /forums/ page shows a line of gibberish with no clickable links. Here is a screenshot: http://s13.postimg.org/w1elw7g07/Untitled.png
I did try creating a new page with the [bbp-forum-indexx] tag (with 1 x) which worked flawlessly.
So here are my questions:
1. Is there a way to use a custom page (and put that shortcode there) for the forum main?
2. Is there a way to fix the forum index?
Thanks!
Hi,
Make your choice:
1. Check item 1 and 2 from https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/
2. Install my ‘bbP Toolkit’ plugin.
Pascal.
This is my scenario,
I create a private Forum of type category , then I create two public forums to type forum which are the children of that category forum. I get a nice category level organization, when I click on the url,
Home/ Forums/ Private: DummyCategory.
But when I click on one of the forums :: Home/ Forums/ Private: DummyCategory/ DummyForum1
all the posts that do not belong to that forum shows up. It means if I post in DummyForum2 or 1 or any forum, when I click Home/ Forums/ Private: DummyCategory/ DummyForum1 , all the posts show up.
It can’t be by design ? Is this a bug ? Most likely some settings need to be changed in the bbpress I suppose , any idea ?
Just for additional details I am using code to add into the forum. I can get the parent child relations between the forums displayed properly, the insertion of the topic goes to the right parent forum. But then that bug shows up.
if (!function_exists('bbp_insert_topic')) {
require_once '/includes/topics/functions.php';
}
echo "All fine here ??? Did it reached ";
$forum_ID = $selectmyID;
$terms = array(bbp_get_topic_tag_tax_id() => $key_pieces);
// The topic data.
$topic_data = array(
'post_parent' => $forum_ID, // forum ID of Projects hard coded
'post_status' => bbp_get_public_status_id(), // Subscribed users can see this
'post_content' => $my_content,
'post_title' => $slug,
'comment_status' => 'open',
'menu_order' => 0,
'tax_input' => $terms
);
// The topic meta.
$topic_meta = array(
'forum_id' => $topic_data['post_parent'],
'reply_count' => 0
);
// NOTICE! Understand what this does before running.
$post_id = bbp_insert_topic($topic_data, $topic_meta);
bbp_stick_topic($post_id , true); // Making it super sticky !
echo "The post id returned is " . $post_id;
echo "Sucessfully inserted the post" . $slug . " programmatically !!!!";
Trying to display fewer replies for mobile users.
Before getting to the mobile users ran into a problem that the following filter:
function mobile_replies() {
$args['posts_per_page'] = 10;
return $args;
}
add_filter('bbp_before_has_replies_parse_args', 'mobile_replies', 10, 1 );
Works, but, it does not change pagination values in the view loop-single-topic.php problem is with the function bbp_topic_pagination()
For whatever reason it is not affected by filters.
In addition changing the rendering type to “list” with this function affects everything else, but not the pagination show in single forum view.
function bbpress_custom_pagination( $args ) {
$args['type'] = 'list';
$args['prev_text'] = '«';
$args['next_text'] = '»';
return $args;
}
add_filter( 'bbp_topic_pagination', 'bbpress_custom_pagination' );
add_filter( 'bbp_forum_pagination', 'bbpress_custom_pagination' );
add_filter( 'bbp_replies_pagination', 'bbpress_custom_pagination' );
Any thoughts?
Probably adding filters to wrong functions
Update: creating a page with the [bbp-forum-index] shortcode works, no idea why it’s broken on the default forum root.
Wow I can’t believe it but I figured this out.
Basically I wrote a function that looks for a result to the bbpress function bbp_reply_id();
IF there’s a result, then replaced my $item_id (the actual post id such as $post->ID) with the id of the reply.
That did the trick. One problem though is that the bbpress bbp_reply_id(); function echoes the number, so I had to clean the echo off like this:
ob_start();
$result = bbp_reply_id();
ob_end_clean();
I decided to program my own Like/Dislike plugin so I could customize it and tweak it for my exact needs. It’s working great in my custom threaded forum view for bbpress here:
Ute Fan Board
By using the hook bbp_theme_after_reply_admin_links I’m able to get the like buttons to show up in the bbpress topics and replies, but they’re all the parent topic. See photo below.

Here’s one of my hooks:
//adds the like buttons right of the time on forum posts in bbpress
function tk_after_bbpress_content() {
$custom_content_after_forum_title = tk_like_buttons();
echo $custom_content_after_forum_title;
}
add_action( 'bbp_theme_after_reply_admin_links', 'tk_after_bbpress_content' );
Hoping perhaps @robkk or @casiepa have some ideas? I can’t get the post id into the plugin for replies. Thanks!
Hi,
Check out ‘Peter’s Login Redirect plugin’.
I saw somebody also using this (but did not test myself):
function login_redirect( $redirect_to, $request, $user ){
return home_url('forums');
}
add_filter( 'login_redirect', 'login_redirect', 10, 3 );
Pascal.
Is this BBPress though, I see xenoforo code only
Thanks Pascal. Both of these worked great. One last question, I have a login page that’s separate from the forum page. Do you have a code I can put in my functions file that will redirect a user to the forum page once they have logged in?
Thanks so much
sorry someone has edited that page and made it less helpful.
Try
Now we have some forums, we need to have somewhere to display them.
There are two ways to do this. Most themes support method 1, and this can (can not will) produce tighter theme integration on style [Note this was true for v 2.2 not sure if it still is !]. However Method 2 allows you to have some introductory words. Your choice…!
Method 1
This requires a couple of checks first
a. In Dashboard>settings>forums look for what is set in the forum root under the forum root slug heading. The default is ‘forums’ but you can set this to anything
b. In Dashboard>settings>permalinks check that the common settings check is set to ‘postname’ If it isn’t and you don’t want to change it, then use method 2.
Now just create a wordpress page that has the heading that was found in a. above eg if the root slug is ‘forums’ create a page with the title ‘forums’, and save.
Once the permalink has been created, you can rename the page to whatever you wish eg ‘mysite forums’ (as the permalink will stay the same, and it is this permalink that bbpress looks for)
Save this page, add it to a menu if you are using custom menus, or decide its order if you have automatic menus. Then publish it to your site.
Job done!
Method 2
If either your theme doesn’t work with method 1, you don’t want permalinks with postname, or you want to use some introductory text (eg “welcome to our forums…”, then method 2 is for you.
In dashboard>pages
go to add new page
Call this ‘Forums’ or whatever you want your menu item to be.
Then in the content section, you may want to have some introductory words “welcome to the forum” etc. then add the following bbpress shortcode
[bbp-forum-index]
Save this page, add it to a menu if you are using custom menus, or decide its order if you have automatic menus. Then publish it to your site.
You will now have a forum page, and a forum to display.
I installed bbPress and am following the “creating content” instructions from this webpage:
Creating Content
I created a forum using the instructions under “Creating a Forum”. The forum (called “Purchasing”) shows up under (Forums: All Forums) in my control panel.
The instructions say that my forum will be created at:
http://yourdomain.com/forums/forum/yourforumname
But when I look at my wordpress pages in the control panel, there is no page for “forum” or any subforum created yet.
How do I actually put the forum as a “forum” page in my website? Even though I create forums, there is no forum page created. Do I have to create that top level “forum” page manually using an “add page” from my dashboard?
Thanks,
Quickest way is to hide it using css
so in your style.css add
.bbp-pagination-count {
display: none;
}
https://codex.bbpress.org/functions-files-and-child-themes-explained/