Skip to:
Content
Pages
Categories
Search
Top
Bottom

Which Page Template filename can I use to display a Forum?


  • bobdobbs
    Participant

    @bobdobbs

    After installing bbpress I have a set of forums.

    Every forum is presented using a php template in my child theme.
    The php template has the filename bbpress.php.

    I’d like to create a php template that applies *just* to the individual forum pages. Not the forum topics or singles. Or anything else.

    I’ve been looking at this:

    Template hierarchy in detail

    The heirarchy seems to suggest that you can use ‘single-[forum].php’, which suggests that ‘[forum]’ needs to be substituted with the name of the forum.

    … which is great. But I want one template to be applied to all forum singles and nothing else.

    Just to test, I copied my existing bbress.php to a file called ‘single-forum.php’.
    bbpress did pick this up and use it for my forum singles.
    But the page didn’t present the actual forum. Where the forum should have been, there was just empty space.

    So… how do I create a template that gets applied to all forums and nothing else?

Viewing 1 replies (of 1 total)

  • Robin W
    Moderator

    @robin-w

    you would I think do better amending the files that display the forum

    the hierarchy for these is

    SINGLE FORUM

    bbpress 2.6.6\templates\default\bbpress\content-single-forum.php
    lists sub forums (if needed) using loop-forums.php
    calls
    loop-topics.php
    calls
    form topic.php

    bbpress 2.6.6\templates\default\bbpress\loop-topics.php
    does topic list headers

    calls loop-single-topic.php

    bbpress 2.6.6\templates\default\bbpress\loop-single-topic.php
    lists each topic in the forum, last post and freshness

    lists topic content.php

    My standard text for how to amend bbpress template files is below with loop-single-reply.php as an example

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php

    transfer this to your pc and edit

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-reply.php

    bbPress will now use this template instead of the original

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