Podcast Episode

148 – How to Properly Modify Genesis Child Themes

Announcements

  • WordPress Webinar
    • This Friday, October 4th, 10am EST
    • You’re Doing It Wrong: 13 Mistakes WordPress Users Make
    • Hundreds have signed up! If you are attending live, make sure to show up 5 to 10 minutes early
    • Register Today!
  • WordPress Classroom
    • Next Friday, October 11th, 10am EST
    • Turn an HTML Theme into WordPress Theme
    • $10 if you register before the event and $24 after
    • In addition to the live training, you will also receive a video replay of the session, before and after code and the slide deck of the presentation.
    • Sign Up Now!
  • WordPress 3.7 Beta
    • Automatic Updates are now pushing out
    • If you’re running WordPress in another language, we’ll automatically download any available translations for official WordPress importers and the default themes.
    • Our password meter got a whole lot better, thanks to Dropbox’s zxcvbn library. Again, subtle but effective. Strong passwords are very important!
    • Search results are now ordered by relevance, rather than just by date. When your keywords match post titles and not just content, they’ll be pushed to the top.
  • Podcast Awards Time!
    • PodcastAwards.com
    • You can only nominate once! So figure out all of your choices and go and submit once!
    • Submit underTechnology
      • Podcast Name: Your Website Engineer
      • Podcast URL: http://yourwebsiteengineer.com

Tools / Plugins

Jim Morrision from [Delime Website Services] has created an amazing resource. It’s a Website Development Agreement package that includes all the text you need for a client contract. Plus, it has an easily importable contact form so you can get the right information from your clients.

Listener Feedback

Question from Steve Stewart of MoneyPlanSOS.com wants to know which he should be using for stats for his website; JetPack or Google Analytics. I’ll share my thoughts in this episode.

Brian Wallace from PhysicianAssistantExamReview.com shared with me a neat new feature in the Evernote Chrome web clipper. You can now take screenshots and send the link directly to anyone. Great for website developers!

148 – How to Properly Modify Genesis Child Themes

What is a child theme?
A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme, and allows you to modify, or add to, the functionality of that parent theme.

Why it’s important
It’s important to use child themes because it allows you to make custom changes to your WordPress site without modifying the original theme. This way, if the developer updates the code, you won’t lose all of the custom changes you’ve made.

If you’d like more information about child themes, please check out my Classroom Replay.

Since there is no such thing as a child child theme, here’s what I recommend you do:

  • You are only going to most likely make changes to the stylesheet and functions.php file.
  • Create a custom.css file
  • Use the following code to add your custom.css to the bottom of the style.css

    @import url(‘custom.css’);

  • It needs to be at the bottom so that it can over write the default css commands
  • Next create a custom_function.php and import into your functions.php file the same way as the stylesheet

    @import url(‘custom_function.php’);

  • If you have to create specific page templates, then come up with a naming convention (like page-dh-archive.php)
  • Before you update, first back everything up.
  • Next copy your custom changes to your local hard drive
  • Update your theme
  • Add back in your custom files (if necessary)
  • Then add in the import commands to the style and functions file

This isn’t the most ideal solution, but you will be able to keep all of your code in the same place and will provide the least amount of hassle when a child theme is updated.

Call To Action

  • Sign up for next webinar
  • Register to learn how to create a WordPress Theme
    • marianpl Reply

      Dustin,
      In regards to Steve’s question about JetPack stats –  Can you tell me how to de-activate the JetPack stats once they’ve been activated?
      Thanks!
      Marian

      Oct 2, 2013
    • dhartzler10 Reply

      marianpl In the JetPack module, click on “Learn More” and it will give you the opportunity to deactivate.

      Oct 2, 2013
    • marianpl Reply

      dhartzler10 Thanks Dustin! All Fixed! 🙂

      Oct 2, 2013
    • Chad Warner Reply

      I believe StudioPress re-issues their child themes under new names when they’re updated. For example, they recently re-issued Executive as Executive Pro. The child themes don’t get automatic updates like Genesis does. So, you don’t need to worry about StudioPress child themes being overwritten. However, your approach still makes sense in cases where you want to manually update to a newer version of a child theme in the future.
      My normal process is renaming the child theme using instructions at http://www.digitalredeye.com/wordpress/how-to-rename-genesis-child-theme, but I may start using your approach.

      Oct 2, 2013
    • dhartzler10 Reply

      Chad Warner thanks Chad! I didn’t realize that they changed the name of the theme. That makes a lot of sense.

      Oct 3, 2013
    • LindaBugbee Reply

      Thanks for another great podcast. I was delighted to see you devoted a big chunk of it to answering my question. Using @import is a simple and logical solution I had not thought of.  I found it worked best to import the original style.css using @import url(‘original.css’) at the beginning of the file then add my modifications and rename it style.css.  Works like a charm and I feel much more organized now.  Did you notice you speak about 3x faster than me?  😉

      Oct 3, 2013
    • dhartzler10 Reply

      LindaBugbee Hehe, people tell me that 😉

      Oct 4, 2013
    • oalcedo Reply

      I get the following error when using your method…

      Parse error: syntax error, unexpected ‘url’ (T_STRING) in /Users/osalcedo/Documents/Websites/www.tikiactionpark.dev/wp-content/themes/genesis/functions.php on line 26

      Suggestions??

      Mar 20, 2014

Leave a Reply