Skip to:
Content
Pages
Categories
Search
Top
Bottom

Why is it a bad idea to copy “bp-default” theme?


  • PH (porsche)
    Participant

    @porscheheritage

    Hi all,

    Im trying to make my first theme. Whilst reading the documentation, it implied that it is not recommended to copy the “bp-default” folder(content)s and place it to a new directory and name it your own then start styling from there?

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

  • Boone Gorges
    Keymaster

    @boonebgorges

    When BuddyPress is updated, changes are often made to bp-default, either to fix bugs, make styling tweaks, or support new features. If you are not inheriting the version of bp-default that is bundled with BuddyPress (in other words, if you copy the entire theme into wp-content/themes and use that instead), then you either won’t get these updates, or you’ll have to manually apply them.

    Using a child theme is great in this way. If you use a child theme, you are only supplying the files that you plan on changing, while the rest of the necessary template files are automatically inherited from the parent (in this case, bp-default). This is an especially good idea if you’re only going to make small, CSS-ish changes to bp-default.


    PH (porsche)
    Participant

    @porscheheritage

    Thanks @boonebgorges

    So… do i just make a “child theme” of “BP-Default”? meaning “copy the content of that” into a new folder “myChildTheme” and make that the “child” of “bp-default”


    techguy
    Participant

    @crashutah

    Boone,
    On BP updates, any files you add to your child theme you’ll have to compare against the update and manually update them with the new features right? So, if I overwrite header.php in my child theme, then when BP updates, I’ll have to compare my header.php with the new release to see if I should copy over any new features right?

    However, like you said if it’s all just done with css, then you don’t have to worry.


    Roger Coathup
    Participant

    @rogercoathup

    @porscheheritage: have you read this article on child theme development: https://codex.buddypress.org/how-to-guides/building-a-buddypress-child-theme/ ?

    That’s the best starting point.

    You don’t copy the BP-default theme – instead in your child theme, you create new templates where you want to override the default ones, and simply inherit the others. A directive you add to your child theme’s style.css file identifies which theme is it’s parent.


    Roger Coathup
    Participant

    @rogercoathup

    @crashutah – that all depends how much you’ve specialised your child theme away from the default. It also depends if there are new features you want to take advantage of – in which case dig around and see how they are being used in the default, and ‘steal / adapt’ as necessary.

    Remember for the most part, a theme is about presentation rather than underlying function / features. That said, this can be blurred as you dig into the activity loops and directory template files.

    We typically derive our child themes from the bp-default theme, but make very considerable changes – chopping out big chunks of the over heavy markup, and making somewhat dramatic changes to the layout. By deriving, we do however get to make use of some of default templates especially within the social loops, etc.

    For some of our newest sites, where you would struggle to know BuddyPress was even there, we are building our own themes from scratch.


    PH (porsche)
    Participant

    @porscheheritage

    Thanks @rogercoathup

    So, I can just copy the CSS and mangle that to taste and not copy the “template files”


    Roger Coathup
    Participant

    @rogercoathup

    @porscheheritage – exactly!

    If you are happy with the content being produced by the template files, then yes, just create you own style.css (and other css files) in your child theme, and modify to meet your needs.

    I quite like the bp-default folder structure for images and css files, so you might want to copy that.


    Boone Gorges
    Keymaster

    @boonebgorges

    @crashutah – That’s right. But chances are that most of your modifications will only take place in a handful of template files, so it’s still way better than having to migrate changes over to a wholesale copy of bp-default. To give you a frame of reference, even a fairly heavily themed version of BP 1.2.x like on http://commons.gc.cuny.edu inherits something like 60-70% of its template files from bp-default.


    PH (porsche)
    Participant

    @porscheheritage

    Good to know @boonebgorges

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Why is it a bad idea to copy “bp-default” theme?’ is closed to new replies.
Skip to toolbar