Skip to:
Content
Pages
Categories
Search
Top
Bottom

Incorporating bbPress theme files, into a pre-existing theme.

  • @ben_allison

    Member

    Here’s what I tried:

    1) Copy bbpress theme folder into my theme

    2) add “add_theme_support( ‘bbpress’ );” to my functions file

    Nothing. I think I misunderstand how the bbpress theming system works. I thought it was more or less a “child theme” that bolts on to twentyten.

    Are there files or snippets of code I need to grab from the bbp-twentyten theme?

    FWIW, the site is running Buddypress, along side bbpress. I’m using the stock Buddypress theme, and my own Buddypress child theme.

    Everything is working perfectly (forum is up and running, etc). All I’m trying to do is used a customized bbpress template so I have complete control over the forum markup.

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • @ben_allison

    Member

    Hmm… just found this:

    <i>”If you are the author of this theme, then you can copy all the files *out of* the “/bbpress/bbp-themes/bbp-twentyten” folder into the folder of your theme, and make your own edits from there. The files to copy include the single-*, archive-*, page-*, and anything in the subfolders.”</i>

    So is the best approach for me to copy the bbPress folder within bbp-twentyten into my theme, and add whatever forum or snippets or files I need to my theme files?

    @pplumridge

    Participant

    Ben, I’ve had more success with the 2.1 development version, available as a zip at the bottom of https://bbpress.trac.wordpress.org/browser/branches/plugin.

    All I have done is create a bbpress directory within my theme folder and in there copied in any files from pluginsbbpressbbp-themesbbp-twentytenbbpress that I wanted to modify. I have not moved any files out of the plugins directory.

    I haven’t had much success with setting the css for bbpress from within my theme. In the end I ended up renaming pluginsbbpressbbp-themesbbp-twentytencssbbpress.css to bbpress_master.css and creating a new bbpress.css in the same folder. Within this new file I have my modifications with the following as the first lines

    /**

    * bbPress specific CSS

    *

    * @package bbPress

    * @subpackage Theme

    */

    /* =bbPress Style


    */

    @import url(“bbpress_master.css”);

    I will need to be careful updating bbpress as I will lose my bbpress.css. Until I work out how to have css working through my theme it will do.

    @ben_allison

    Member

    Yeah I realized I can move files from the original template, but it looks like theming 2.1 is going to be much more smooth.

    Thanks chaps!

    @jamescarson1

    Member

    Is the process that Paul outlined the best option at this time for modifying CSS, or is there some special mojo to get css working in a custom theme folder by copying or creating a bbpress.css etc.?

    many thanks for laying the foundation of a nice new lightweight forum!

    @ben_allison

    Member

    It’s been a few weeks, but I think the process was:

    1) add child theme declaration to your theme’s function.php file

    2) Make a file called bbpress.php in your theme folder; this is the template used for the forum index (in the same way that index.php is the default for the blog in wordpress).

    3) create a bbpress folder in your them folder

    4) COPY any bbpress template files you want to customize into this folder from pluginsbbpressbbp-themesbbp-twentytenbbpress

    SOOO easy it hurts.

    Don’t forget, you might need to grab functions from the 2010 functions.php file, and you’ll also need to make sure you pay attention to styles that scripts uses (like the ajax loading style, etc).

    @jamescarson1

    Member

    right… thanks for the response.

    I’m not having problems with any of the above, although in my case i’m only adding bbpress.php to my theme folder.

    the question i have is with the bbpress.css. Paul made a duplicate of bbpress.css plugins/bbpress/bbp-themes/bbp-twentyten/bbpress.

    Obviously that’s going to get zapped on an update of the plugin. Thats why Paul recommended creating something similar to a child theme–turning bbpress.css into bbpress_master.css then putting just his tweaked css in bbpress.css.

    This lets him have a dedicated small css file, bbpress.css to retain during an update, but unfortunately he’ll have to back it up himself.

    So, my question is there some provision for the bbpress.css being read in the same way that bbpress.php is read in a theme folder? Or is there a better way to handle css modifcations? Maybe I am missing something.

    Thanks again,

    @jamescarson1

    Member

    Sorry for the double post….

    Or should we just use !important in our master css files?

    @jaredatch

    Member

    https://wordpress.org/extend/plugins/bbpress-custom-css-file/

    bbPress will use bbpress.css from your theme folder.

    So to recap:

    1. Copy the master bbPress css file to your theme directory and rename it to bbpress.css.

    2. Go to the plugin page in the admin. Activate bbPress Custom CSS File.

    3. profit.

    @jamescarson1

    Member

    Jaredatch, this is gold. And it will be appreciated by many people I imagine. This should be reposted as a sticky or similar until it’s added to the plugins page or to the next bbpress update?

    By the way I just tested the code and it’s working great. It’s missing a closing ?> tag.

    Thanks!

    @jaredatch

    Member

    No problem, glad I can help.

    I’m going to submit this simple plugin to the wp.org repo. Once it’s up I’ll talk to @jjj and see if it warrants a sticky. :)

    Regarding the missing tag, closing PHP tags (?>) isn’t required (at the end of the file) and it’s usually good practice to omit them. More info on that http://stackoverflow.com/questions/4410704/php-closing-tag

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