Skip to:
Content
Pages
Categories
Search
Top
Bottom

WHY create a child theme?

  • @tecbay

    Participant

    I mean, I already saw a lot of people saying that u can just edit the default(most in bp-templates/bp-legacy/buddypress/members/single) but also I hear people saying that I lost a lot of things when the BP update.
    So, what’s true? Simple edits is valid or better an new child theme?

    *If child theme, where start?(https://codex.buddypress.org/themes/building-a-buddypress-child-theme/ this page is a little confuse…)

Viewing 6 replies - 1 through 6 (of 6 total)
  • @danbp

    Participant

    Better a child theme and to start, read here first:
    https://codex.wordpress.org/Child_Themes

    and once you understood how it works, you can read again
    https://codex.buddypress.org/themes/building-a-buddypress-child-theme/

    and search on the forum for topics related to theme. 😉

    @tecbay

    Participant

    I already have an childtheme(blank and useless) of my own parent theme, but my question is for the buddypress theme. How can I connect him with the BP plugin? What the BP updates means to this childtheme? o.O

    @danbp

    Participant

    @tecbay

    Participant

    I’m feeling so noob ‘-‘
    Anyways, let me know if I get it…So I knew childtheme had the purpose of “protecting” the theme updates. But I don’t understand how BuddyPress understand that. I mean if I paste a new pages.php in childtheme it will just change all templates of both themes or just the theme of the BP community?

    If this last its right. I have just to create a subfolder /buddypress/ in my CHILDtheme and copy all the content of /plugins/buddypress to that subfolder?
    *Of course, considering that already have a functions.php and style.css for the childtheme.

    @hnla

    Participant

    But I don’t understand how BuddyPress understand that

    It does because it’s written to understand that. WP knows what type of theme is in operation, a main parent ‘ template’ or a theme acknowledging another theme as the template source thus labelling it a child theme; WP provides that information to anything that cares to ask. BP performs a series of simple checks, it looks to see what type of theme in operatio, it checks various hardcoded directory names to see if they exist either in a parent theme or in a child theme and if they contain BP template files, if they exist and do have BP templates then those are used in preference to the original BP ones. It’s not that complex a process but you do need to understand the basic principles of template hierarchy which is a WP construct.

    You can only ever have two themes max a parent and one containing ‘some’ copied files or additional files coded. WP always loads the child theme up checks anything in functions.php then looks at the parent theme and loads that themes templates and functions.php unless it has found a necessary template already in the child.

    @tecbay

    Participant

    Right, but we have a lot of files about the BP. To edit the profile CSS, did you think it’s recommended copy all the plugin/buddypress/ folder or just the buddypress.css in /themes/parent-theme/buddypress?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WHY create a child theme?’ is closed to new replies.
Skip to toolbar