Child Themes

Community Forums Forums General Discussion Child Themes

This topic is: resolved

This topic contains 6 replies, has 4 voices, and was last updated by  rfmeier 1 year, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #44132

    Williamz0
    Participant
    Post count: 18

    Hi – just to introduce myself, my name is Gary Williams a web designer who has resisted delving into the world of WordPress for too long!

    To get myself started, I have bought and set up the Genesis / StudioPress Backcountry Theme with the idea to fiddle and customize as part of the learning process.

    I have watched a few WordPress Tutorials on Lynda.com which were great but now I am itching to jump into the deep end.

    Now I have a very basic question I need to ask before I start – apologies if this is too basic or obvious……

    The Lynda training course suggests creating a “childof….” folder and css file for overriding the default theme CSS file. The advantage of this is if the theme gets updated by the creators, any custom CSS you create won’t get overwritten.

    Given that BackCountry is in theory a child theme, do I still need to do this?

    Do other developers normally do it this “override” way or do you just jump straight into the main CSS and php files and customise them?

    Once again if this is a silly question.

    Gary Williams

    #44142

    rfmeier
    Participant
    Post count: 597

    Gary,

    Welcome to WordPress and Genesis. You are correct in your understanding of child themes. If the parent theme receives an update, it doesn’t affect the child theme.

    During a page load in WordPress;  If a child theme is used, WordPress will check for a theme file in the child theme first. If that file does not exist within the child theme, it will use the parent version.

    One exception is the functions.php file. They will both be executed within a page load, but the child theme functions.php will be executed first.

    Best bet is to get familiar with Genesis actions and filters. A sample child theme should available for download on your StudioPress downloads if you have purchased previously. Check it out and experiment.

    Also note: Never edit the WordPress core. Never edit the parent theme.

    Reference;

    http://codex.wordpress.org/Child_Themes

    http://my.studiopress.com/docs/hook-reference/

    I hope this has helped.


    #44144

    Bill Murray
    Participant
    Post count: 575

    Backcountry is a child theme, so that step has already been done for you. The instructions you received could apply if you wanted to make a child theme of Twenty Twelve, the default WP theme.

    In the Genesis world, you should never modify core Genesis files or styles. You make all of your modifications in a child theme or via plugins. Thus, in the Genesis world, everyone that’s doing it the right way does it as the course described – except that the framework/child theme structure work has already been done for you.


    Web: https://wpperform.com or Twitter: @wpperform

    We do managed WordPress hosting.

    #44146

    Williamz0
    Participant
    Post count: 18

    Thanks Bill and Ryan – very useful!

    So I should think of Genesis as the parent theme, leave it untouched and delve straight into the BackCountry CSS and PHP files.

    #44149

    rfmeier
    Participant
    Post count: 597

    You’re welcome. Good luck.


    #44166

    devnick
    Participant
    Post count: 12

    Ryan,

    Like Gary mentioned, I’ll be getting back into Genesis and a related theme to upgrade an old html site.

    I understand the child theme concept.  I noticed that a lot of the old studiopress themes got upgraded to new mobile responsive versions.  With that in mind… My questions is, should I make a child theme of the child theme if I plan on making some changes.  I was thinking of adding some additional code for a google maps implementation or maybe adding custom posts, so not talking about changes to the site via the theme widgets.

    Thanks.

     

    #44170

    rfmeier
    Participant
    Post count: 597

    Honestly, I am not sure if you can make a child them of a child theme. Even if it is possible, I would never do it as it would become a mess in the end.

    Stuff like Google maps would be better off implemented as a plugin. This allows a separation from the theme in the event you update/change themes at a later date. Custom Post Types fall into the gray area depending on how they are used. In the past I have always created Custom Post Types as plugins and adjusted my theme to accommodate the output/display. That way if I change themes, I don’t have to worry about adding codes for files to the theme, just the presentation of my custom post types.

    You could always created Genesis specific plugins that target the Genesis actions and filters. This would allow for flexibility with styling and presentation.

    Other developers here can add their two cents on older themes being upgraded to responsive layouts as I have not used a lot of the themes nor been around long enough to be aware of the upgrade effects.

    I hope this helped.


Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.