Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I get bbpress pages to use a specific page template in WordPress?

  • @mccawphoto2

    Member

    I just installed the bbpress plugin and it seems to work great. I am working on stylizing it to match my site. How do I get it to use a specific page template for the forums? Can I make the forums pull into a specific page that I create and then set a page template?

Viewing 21 replies - 1 through 21 (of 21 total)
  • @veppa

    Participant

    bbpress checks for ‘bbpress.php’, ‘forum.php’, ‘page.php’, ‘single.php’, ‘index.php’ files in your theme directory. uses first file that exists in this order.

    You can copy your index.php as bbpress.php and make changes on it.

    @smithgt

    Participant

    Thanks – been looking for that answer myself 🙂

    @byeuji

    Participant

    This is a beautiful solution.

    To clarify for those who might not understand immediately (took me a second):

    • go to your theme folder
    • choose the layout you want bbpress to use (full page, # of columns, etc. — whatever options your theme has)
    • copy the the corresponding .php file
    • name it “bbpress.php” in the very same theme folder
    • simply refresh the page and bbpress will now lay out the way you want it to.
    • Perfect.

    @klogan2

    Participant

    thanks for the clarification byeuji,,, very helpful,,, it still doesn’t work,,BUT I am investigating why now 🙂

    @ace2five

    Participant

    Hi, I’ve tried this but while it sets the page correctly here: http://ace2five.tv/forums/ and on most other pages, if you click through into a forum: http://ace2five.tv/forums/forum/bbpress-theme/ or here: http://ace2five.tv/forums/topic/topic-bbpress/ it fails to display correctly. This appears to be a header issue. I have asked on the theme thread but had no advice as yet.

    Theme is True Mag installed this week, bbPress installed latest version yesterday. Any help much appreciated.

    @luisthegeek

    Participant

    @ace2five, i see that you got yours fixed. mind letting us know what the fix was?

    @ace2five

    Participant

    @luisthegeek mine was a theme issue. I contacted the company I bought the theme from and they produced a fix.

    @robin-w

    Moderator

    great- glad you’re fixed

    @luisthegeek

    Participant

    So i did what you guys recommended, copied the no-sidebar template page from my theme folder, and placed it in the theme folder. No change. Also tried placing it in the child theme folder. still no change. Am I missing something?

    @asafalyrayyan

    Participant

    Same problem, but i’ve got it works now.

    step 1 : copy “your-full-width-page.php”. mine is template-fullwidth.php (if you not sure this is a full width page, open the file with editor like dreamweaver, wordpad, etc and make sure it has no “side bar” layer).
    step 2 : rename the “your-full-width-page.php” to “forum.php” and put it to \your-site-name\wp-content\themes\your-theme
    step 3 : then open the “forum.php” you just copy with editor (and rename all class of the <div>)
    example <div id=”primary” class=”content-area”> to <div id=”primary2″ class=”content-area2“>
    step 4 : simply refresh the browser and BAM!

    @mauryg

    Participant

    ABSOLUTELY FANTASTIC.
    This was EXACTLY the answer I was looking for. And mind-numbing SIMPLE.
    Thank you all very much.

    Maury

    @membershipsite101

    Participant

    I am really lost on this also, I need HELP and optimizepress support was completely useless, odd that they have user roles functionality already built in for bbpress.

    In the screenshots (members area protected forum, sorry)
    The first screen, everything is great until you click on the topic Welcome, then it picks a completely different template and it has almost driven me to tears for the last 5 hours

    ANYONE, tell me what to do and I can do it. (usually lol)

    http://www.membershipsite101.com/pics/forum1.jpg (perfect)
    http://www.membershipsite101.com/pics/forum2.jpg (driving me CRAZY)

    @mauryg

    Participant

    @membershipsite101
    Don’t know if we are talking about the same problem. It seems like your site is using a different HEADER template for the Welcome page. Also noted that the Welcome page is a subpage of the HELP page, not of the FORUMS page. Are you using bbpress shortcodes for this? You might want to check the bbpress settings page and see if the slugs are set correctly.
    But anyway, I looked at your site and I noticed that the bbpress.css file was being loaded from the bbpress plugin directory, not from the theme directory.
    Did you in fact copy the template.php file you want to use into the theme directory and rename it bbpress.php? I also strongly suggest copying the bbpress.css file into the theme directory as well so you can make changes to the bbpress styling easily.
    Hope this helps.
    Maury

    @membershipsite101

    Participant

    Thanks Maury for the reply. I did nothing literally. I installed the bbpress plugin from inside wp. I then created a page called forum in optimizepress, picked a template which is screenshot1. In the template I simply added this [bbp-forum-index]

    Other than that I did nothing

    forum root slug is discussion
    single forum slug is forum

    I didnt copy anything or move anything, I am semi illiterate on that, but with step by step I can handle it.

    @mauryg

    Participant

    @membershipsite101
    Using the index shortcode on the ‘forum’ page is perfectly normal. If you leave the /forum page blank then you can choose whether to show the forums index or the topics index on the bbpress settings page.
    As I noted before the URL of the Welcome page says it is a subpage of the ‘Help’ page (http://membershipsite101.com/help/welcome). So I would expect it to use the template of the /help page, not the one of the /forum page. Do you perhaps have a page titled ‘Welcome’? Try hovering over the forum title on the /forum page and see what the link says. If the forum root is ‘discussion’ then the /welcome page should be either /discussion/welcome or /forum/discussion/welcome.
    I think you need to review your bbpress settings again. Look at my page http://spaug.net/forums.
    I use the bbpress default settings as follows:
    Forum root slug: forums
    Forum slug: forum
    Topic slug: topic
    And I check the ‘Forum Prefix’ box as recommended.
    Then my URLs are as follows:
    Root page: sitename/forums
    Individual forum page: sitename/forums/forum/forum-name
    Individual topic page: sitename/forums/topic/topic-title
    I suggest that you try changing the forum root slug to ‘forum’ or ‘forums’
    Finally, unless you are very adept at CSS modifications, I recommend the ‘bbp style pack’ plugin. It allows you to modify colors, fonts, font size, etc easily.
    Remember, whatever optimizepress theme template.php you want to use for the forums page (right sidebar, no sidebar, etc) make a second copy of it IN THE SAME FOLDER and rename it bbpress.php. That way bbpress will always use that template. I also make a copy of the bbpress.css file from plugin folder (\wp-content\plugins\bbpress\templates\default\css\bbpress.css) and put it in the theme folder. That way you can use the WordPress Editor (Appearance>Editor) to make changes.
    I just did a quick Google search on ‘Optimizepress and bbPress’ and it looks like there is a lot of incompatibility. I also noted that Optimizepress was discontinuing their support forum in favor of their ‘customer happiness team’. My condolences
    Having fun yet?

    Maury
    Maury

    @membershipsite101

    Participant

    Maury, thanks for taking the time to type all that out. I am on it. Again, much appreciated. Off I go 🙂

    @membershipsite101

    Participant

    Well Maury, I feel completely defeated. Here is a reply I got from a great guy at optimize press but it just doesnt seem to be in the cards and thats a shame

    Regarding bbPress, it can not be used within pages created with the live editor. It uses the blog template, so the styling would need to be setup under “OptimizePress > Blog Settings (or blog setup)”

    @robin-w

    Moderator

    ok, @membershipsite101

    This old link talks about using templates

    https://optimizepress.zendesk.com/hc/en-us/community/posts/200815558-OptimizePress-2-bbPress-Total-Mess-Let-s-get-this-fixed-now-

    and suggests putting

    if (is_bbpress()) { include 'bbpress.php'; exit; }
    

    on top of index.php (for the forum-index) and single.php (for the topics) and then style the bbpress.php in the /themes/optimizePressTheme/ /themes/1/ (or whatever OP2 blog-theme you’re using) to your liking.

    If you’re a bit techy, might be worth looking at.

    @newtech1

    Participant

    I am wanting my bbpress tags and bbpress search input form to display on my forum main page just below the bread crumbs.
    This is what I understand to do.
    A. Copy my page.php template from by theme folder. (..//wp-content/themes/fishingclub)
    B. Rename it bbpress.php and upload to the theme folder.
    (I do this and the forum main page displays properly.)
    Here is the page,php code:

    <?php
    /**
     * The template for displaying all single pages
     *
     * @package WordPress
     * @subpackage FISHING_CLUB
     * @since FISHING_CLUB 1.0
     */
    
    get_header();
    
    while ( have_posts() ) { the_post();
    
    	get_template_part( 'content', 'page' );
    
    	// If comments are open or we have at least one comment, load up the comment template.
    	if ( !is_front_page() && ( comments_open() || get_comments_number() ) ) {
    		comments_template();
    	}
    }
    get_footer();
    ?>

    C. Since I want to display bbpress tags and bbpress I need to put these shortcodes in the bbpress.php template: [bbp-topic-tags] and [bbp-search], BUT the page crashes no matter where I put the shortcode.
    D. I assume I must put some kind of coding before and after the shortcode. No idea what I need to do.

    @newtech1

    Participant

    I thought another solution was to just put the shortcodes in the wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php file but the shortcodes do not work.

    @newtech1

    Participant

    Any solution?

Viewing 21 replies - 1 through 21 (of 21 total)
  • You must be logged in to reply to this topic.
Skip to toolbar