Topics from all forums on one page? (bbpress 2.0)
Create a page and put “[bbp-topic-index]” as the content. That will make the page list the topics.
Someone reported having trouble with that function here – https://bbpress.org/forums/topic/bbp-topic-index-does-not-function-properly-at-certain-circumstances.
Thanks Andre — working good here now, though I’ve switched to a custom template page now that I see how it works. My next (and hopefully last) question:
On my topics index page I’ve included the form-topic template so users can create topics from that page. The topic form however seems to have no functionality for choosing what forum to post in so it defaults to one of them. Is there a way to fix that?
I created a page and put [bbp-topic-index] and [bbp-topic-form] as the content. It’s letting me choose the forum and topic type. Is this the method you used or did you hard code it?
(I’d give you the URL to the page I created, but I don’t think it would do any good since you can’t login so you won’t see the create a topic form.)
I hard coded it so I could get some more control over it but perhaps that’s the issue, good to know it’s in there though. I’ll hack around and see.
I’m not enough of a coder to be much help, but I would start here https://bbpress.trac.wordpress.org/browser/branches/plugin/bbp-includes/bbp-core-shortcodes.php
Okay, new problem:
I made a /forums/ page with those two shortcuts in it and it works fine as long as I rename my forums base archive slug to something other than forums. Otherwise the contents of archive-forum.php display instead of my shortcode page.
This would be fine except it replaces /forums/ in all the URLs with whatever I specify as my forums base archive slug. Any ideas?
The best suggestion I have is to keep the page “forum”, make the base “forums”, and make the single slug “forum”.
I hope there are some more options for this on the way.
Hmm. Well, I came up with a hack for my hard coded archive-forum.php. I threw:
$wp_query->query_vars = null;
in before any of the bbPress code and that seems to make it stop thinking it’s in a forum. It works but it’s ugly.
Thanks again Andre.
I think you’ve moved beyond where I can be much help. Hopefully JJJ will chime in.
@bradsucks – So, I’ve put some thought into the situation that you’re in, and RC1 will include some tweaks to how this works which will hopefully help.
The issue, is that we want to make it easy to get forums up and running, without a bunch of configuration, and the easiest way to do that is let WordPress handle things naturally, and display the forum archives when you navigate to:
But… everyone wants to customize the way their forums look and work (even me) so that isn’t always optimal, and there is only so much you can do before the real answer involves creating your row custom theme.
Anyways, before the archive templates were created in bbp-twentyten, a page-template was used to let you put your forums anywhere in the page hierarchy of your site that you want, but that wasn’t obvious enough and not everyone wants to use the hardcoded template file either.
So then I introduced shortcodes, which allow you to put your forums and topics in any post or page you choose, but if you do that, there’s no real way for bbPress to *know* where you put your forum root in the breadcrumb without you manually telling it in the forum settings.
As you can see, it’s gotten complicated to try to satisfy the golden 80%, including myself.
Part of the change that is coming in RC1 is a check to see if a WordPress page exists where you have configured your forum index to be. Normally WordPress would override and show the forums archive, but I make it dump out your page instead. This way you’re able to setup a WP page with whatever you want in it, and have it do whatever you tell it to. The potential caveat here is when people try outsmart the software, create a page with the ‘forums’ slug, and wonder why bbPress doesn’t automatically make forums appear there.
Hopefully RC1 and beyond will satisfy the needs of 80% of users. If so, I’m satisfied supporting the other 20% that want something more tricked out.
- You must be logged in to reply to this topic.