Skip to:
Content
Pages
Categories
Search
Top
Bottom

Child theme (when running along side Buddypress 1.5


  • ben_allison
    Member

    @ben_allison

    So I’m running bbPress 2.0 alongside Buddypress 1.5. I’m using a child theme, based on Buddypress’s default theme… but I want to tweak some bbPress pages.

    Let’s say, for example, the main forum view.

    Right now, it’s based off page.php in my child theme, and is taking the title of the last forum, and using that in the the_title() tag I have for the page title.

    On other “pages” I this makes sense; it’s getting the title while in the loop.

    For the bbPress forum page, it’s wonky.

    So, I want to make a main forum-view specific template file… but I’m unsure as to the best approach when I’m running a child theme for Buddypress.

    FWIW, all forum’s are being handled by bbPress and it’s default template files.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

  • LabSecrets
    Participant

    @labsecrets

    Undoubtedly, your easiest way to go is to use shortcodes for this purpose. You simply create a new page for each view (like forum-view), then add the shortcode you prefer to the page via the post editor. In this case a forum view is easy and uses “bbp-forum-index” (within short code brackets…remove the quotes). Here is a list of shortcodes to start: https://bbpress.org/forums/topic/bbpress-20-shortcodes

    We have a full video that might also help you:

    http://labsecrets.com/2012/01/23/buddypress-and-bbpress-forums-made-easy/

    Cheers!

    Spence

    http://labsecrets.com


    ben_allison
    Member

    @ben_allison

    This seemed like a brilliant solution, but I’m sure I’m doing something wrong.

    I already had a “forums” page, with the short code in place. The page slug is “forums.”

    So, I figured I would make a template called page-forums.php, thinking that WordPress’s template hierarchy would take over… no such luck.

    I will watch the vid when I get off the train. I’m sure the answer appears within the first 30 seconds…


    LabSecrets
    Participant

    @labsecrets

    Unfortunately you can’t do that…bbpress doesn’t work with the native wp template, or child, it only works “within” the template structure (think of it like an insert that goes into the content area of the wp template).

    As a result, just make a regular page with your wp theme, and add shortcode to the post editor. If you want you can style the wp template for header and footer and sidebar and width, etc., but not to add the short codes for bbpress :-)


    ben_allison
    Member

    @ben_allison

    Hmm… so is there no way to override the bbPress theme, from my theme?

    Is there at least a conditional tag I can use in my theme to determine whether I’m on a forum page or not?


    LabSecrets
    Participant

    @labsecrets

    You can always override the default twentyten bbPress (core) theme using CSS, for most elements or their attributes.

    However, to override the default markup, it would most likely require you to use an action or filter in your wp theme (or child theme) functions.php, or to modify the core plugin theme files (being aware of the fact that you would then have to protect these in the event of any plugin update). See this for a list of some 110 action hooks: https://gist.github.com/1372637

    You could use body.bbPress xxxx {element:attribute;} in your css to help you restrict your css mods to only bbPress pages. I believe you can also use many bbPress specific conditional tags as well. See: https://bbpress.org/forums/topic/bbpress-20-conditional-tags


    ben_allison
    Member

    @ben_allison

    Thanks a million!

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