• Skip to main content

WP Clips

Update-Safe Code Customizing for WordPress

  • What is a Clip?
  • Docs
    • Installing WP Clips
    • Updating or Upgrading WP Clips
    • Extending WP Clips
    • Customizing a Clip
    • Precoded Clips
      • What are Precoded Clips?
      • Installing Precoded Clips
      • Precoding a Clip
      • Precoded Clip Modules to Extend WP Clips
    • Managing Clips
    • WP Clips Multisite
    • Video Tutorials
  • FAQ
  • Blog
    • WP Clips V3 Released!
    • Adding Custom Code in WordPress Multisite
    • Add or Customize / Replace JS and CSS Files with WP Clips
    • Add or Customize Page Templates with WP Clips
    • Updating and Managing Translations with WP Clips
  • ClipBank

Genesis

You don’t NEED to update your Genesis child theme … but SHOULD you?

Oct 12 2016 ·Written by Jon Barratt

It’s the most fiercely debated topic on Genesis forums – Should you or shouldn’t you update Genesis child themes? And, as importantly, how does this affect StudioPress best-practice of applying customisations directly to child themes.

Former StudioPress support rep Andrea Whitmer said it best in her excellent article,  “No, You Don’t Need to Update Your Genesis Child Theme”  –”Want to start a debate that will continue until all parties are too exhausted to keep going? Ask about methods or reasons for updating Genesis child themes – Days later, when you crawl out of the fray – bruised, broken, and determined never to ask a question again – you may still be looking for a recommendation.”

Yep. That about sums it up. Andrea’s article sets the background for this fiery debate and offers a well-articulated case for saying NO to Genesis child theme updates.

In this article, I present a case for saying YES to child theme updates. And at the risk of a few more bruises, I’ll illustrate why I believe the current best-practice is becoming outdated, impractical, potentially damaging, and should be reviewed.

Important note! This article assumes basic levels of code customising. Significant deviation from the original theme, either stylistically or functionally, should really qualify as a new theme in its own right. Hence, this debate does not apply.

Progress in the update debate.

Thankfully, the debate is evolving. StudioPress fundamentalists have shifted from “Genesis child themes don’t get updated” to “Genesis child themes don’t NEED to be updated”. A necessary step given that a quick scan of StudioPress child themes reveals that out of 95 child themes (as of October 2016), 76 have received updates with nearly half occurring this year.

This statistic is likely to climb. Why? The answer is as simple as it is compelling – the most innovative framework attracts the most innovative developers.

Genesis child themes aren’t limited to StudioPress. An expanding community of creative, forward-thinking theme developers are continually pushing the Genesis framework to new and exciting levels. As a result, many child themes are no longer just aesthetic skins, they’ve become virtual theme extensions, including more complex functions, scripts and even built-in support for external plugins such as WooCommerce.

StudioPress founder Brian Gardner recently confirmed in an interview with Matt Mullenweg that StudioPress itself “has put WooCommerce compatibility on the roadmap for its themes” – further evidence the Genesis child theme landscape is changing.

  1. We’re seeing an increase in quality third-party theme developers creating more child themes for the Genesis framework.
  2. StudioPress, while expanding its own child theme vision, recognises this external asset and is adding more third-party child themes to its store.
  3. Many of these child themes are more functionally complex, and so have a greater susceptibility to deprecated code.
  4. Many of these child themes include built-in support for third-party plugins and so are  susceptible to updates in supported plugins.
  5. Developers are keen to ensure their themes are current by removing deprecated code, including new theme support features, and maintaining compatibility with supported plugins.

Add to this the ever-increasing speed at which web technologies, protocols and standards are advancing, plus the frequent addition of theme support features to comply, and I believe it’s a mistake to bury our heads in the sand with respect to child theme updates.

After all, as a user I want the latest version, and as a developer, I want my users to be equipped with the latest version. Andrea quite rightly claims, Genesis child themes, in most, don’t need to be updated. But, my argument is not whether you need to, it’s whether you should. And if there is an update available, why you wouldn’t?

So, why wouldn’t you update your child theme?

Those that don’t, and those that won’t, have two primary reasons –

  1. The belief that only the parent theme receives updates, not the child theme.
  2. Best-practice is to customise the child theme directly, and so updates will overwrite customisations.

Only the parent theme receives updates, not the child theme.

This line is usually followed by, “That’s the point!”. However, I’m not sure it IS the point given that Genesis child themes DO get updated and the trend is sure to increase.

It’s also important to acknowledge the difference between a standard parent theme and a framework. Adopting the StudioPress ‘car’ analogy, the framework is the chassis and the child theme is the ‘cherry red’ paintwork. Both are necessary. However, a standard parent theme stands alone. The child theme is optional and created only for ‘customising’. In the context of this debate, there is a profound difference.

Best-practice is to customise the child theme directly.

This is really at the core of the entire update debate. On a near-weekly basis, we witness the Genesis newbie querying where to place customisations so they’re not overwritten by child theme updates, only to be belted with an array of conflicting responses and best-practice recommendations which, in my mind, no longer make any practical sense.

It’s an escalating issue. Why? Because Genesis users, new and old, can quite clearly see that Genesis child themes are being updated and an undeniable conflict is presented if a user wants the freedom to apply updates while subscribing to best-practice.

Updating is a good habit.

If users are encouraged to update WordPress, to update the framework and plugins, why exclude child themes? This seems genuinely illogical to me. Not only does it blur the lines on good routine, but it places a site at greater risk of faltering due to incompatibility with its up-to-date components. Andrea’s article refers to a fear and bad habits contagion in the context of “freaking out” about updates. However, I’m more likely to “freak out” over ‘not updating’ than I am having the most compatible, most secure, most up-to-date version of a child theme.

The Danger.

I believe that in the long-term, clutching onto current best-practice may actually damage Genesis framework’s well-earned market position.

Business models thrive on innovation and harmony, and wither on uncertainty and dissension. In fact, it’s fair to say that innovation and harmony have been two cornerstones in the framework’s success! However, there is now a simmering level of frustration creeping into the Genesis community in regard to the update issue. And it’s growing –

  1. Genesis newbies are getting caught in the crossfire of the best-practice debate. And their confusion is warranted given they’re told Genesis child themes don’t get updated when clearly they do.
  2. Genesis veterans are clinging onto best-practice methods while becoming increasingly cognisant of the changing landscape in child themes.
  3. Genesis theme developers, who should be encouraged to stretch the boundaries and push the framework’s capacity forward, may be curbing their creativity, either consciously or subconsciously, over best-practice concerns and the fear that ‘something’ in their theme may, at some time, require updating.

These factors create a feeding ground for uncertainty and disagreement, and result in retardation, at some level, of an otherwise flourishing business model.

The knuckle-biting solution.

I believe most Genesis users would apply child theme updates if it was simple and safe to do so. Therefore, the solution is obvious.

Isolate customisations from the theme folder, making them update-safe.

There. I said it. It flies in the face of current best-practice. But, there won’t be any plagues, no floods or fires, we won’t descend into darkness. All we’ve done is acknowledged that the child theme landscape is changing and either discarded or adapted best-practice accordingly.

What are the negatives?

I’ve heard several reasons why custom code should not be separated from the theme folder, ranging in extremes from overridden code costing a site a few hundredths of a second in loading time, to endangering a client’s business! However, the most popular argument is that separate files or plugins can be dangerous.

This assumes that if an active theme is substituted for another, theme-specific customisations may see the site go haywire and the owner promptly committed to a mad-house. I believe this argument is lost with quality developers, however. Good code or a good plugin should include safety measures to block a code’s engagement if a related theme is not active. So, the result should be no different to substituting any other theme.

There is a risk, however, that a plugin is neglected by its developer and becomes obsolete, or that the plugin will be accidentally deleted by another admin. Both risks are negated by writing custom code direct to accessible plugin files rather than a database, and installing these files as a must-use (mu-) plugin to prevent deletion via WordPress admin. This can be achieved manually or by installing a database-independent plugin such as WP Clips.

Important note! Page builders and intuitive customiser plugins such as Beaver Builder, Genesis Extender and Design Palette Pro, are also designed for non-coders and, therefore, not relevant to this discussion.

What are the benefits?

Simple. Customisations are safe from child theme updates. In addition, they are easy to find, easy to back-up, easy to copy and easy to transfer.

There is also an advantage when it comes to multisite. Separate files allow a user to customise each individual site using the one Genesis child theme. This is not possible with current best-practice which would require multiple copies of the theme, each with its own customisations.

To summarise.

I’ve mentioned Andrea Whitmer a few times in this article, so I’d first like to say that I have great respect for Andrea, her contributions to StudioPress, and her educated opinion in regard to this issue. I just have an alternative point of view.

In a nutshell, these are my points.

  1. The Genesis child theme landscape is changing. We’re seeing more child theme developers and more child themes with greater functionality and dependence on third-party peripherals.
  2. StudioPress recognises this asset and in addition to introducing a new league of child themes in its own right, it’s embracing more third-party products and involvement.
  3. Greater complexity and dependencies in child themes, plus an accelerating advancement in web technologies, means a greater susceptibility to external code changes and the need to release updates.
  4. Updates are already occurring. As a result, there is a perceived conflict when arguing that child themes don’t get updated (or don’t need to be updated) when there is an obvious progression in versions. This is causing a level of contradiction and uncertainty in the Genesis community, particularly with new users.
  5. Continuing uncertainty and dissension could have a negative effect on the Genesis brand.
  6. Updating is a good habit. And in general, users want the latest version, and developers want their users to be equipped with the latest version.
  7. Current best-practice is a limiting methodology. It prevents users from updating their child themes or, at the very least, makes it problematic to do so.
  8. The issue is easily resolved by changing or relaxing best-practice to endorse the isolation of code customisations from the child theme folder, and hence the debate of whether child themes should or shouldn’t be updated is annulled. The user is free to choose.

Who am I to say?

Two and a half years ago, I developed the Envy e-commerce Genesis themes. Sometime after that, I developed WP Clips to allow my clients to add update-safe theme customisations because major updates in WooCommerce occasionally required updates to my themes. My clients quickly embraced the product, so I elected to make it available to all Genesis users at http://wpclips.net.

What’s my personal process?

As you’d expect, I use WP Clips to create a custom Clip of PHP, JS and CSS files. Custom code is added to these files and any modified templates, scripts and images are added to the same custom Clip folder. I often install a few precoded Clips to serve up my common customisations, one of which is to combine and minify all CSS and JS files within the plugin.

After completion, I turn the custom Clip into a precoded Clip and specify the theme and plugins required for the Clip to activate, then transfer the plugin files to a must-use (mu-) plugin to prevent accidental deletion. And that’s it! No fuss. Easily backed-up. Easily transferrable. Database independent. Safe and secure. Quite honestly, an extremely simple solution to what I see as an unnecessary problem.

A final word.

It could easily be said that I’m perpetuating the problem by adding fuel to the debate. And that perhaps I should simply accept that ‘this is how it is’, retreat quietly into the night, and it all goes away.

However, I am quite certain it won’t go away. Users will continue raising the issue because there is a conflict. There is a problem. And avoiding discussion, even fierce discussion, is not how progress is made. It’s not how new truths emerge and it’s not how better practices are formed.

So, this debate is absolutely necessary for the good of the framework and its community. I’m not saying that mine is the right solution and I’m not saying Andrea’s is the wrong one. I’m saying it’s in everyone’s interest to have their say. Because, eventually we may “crawl out of the fray – bruised and broken”, but there will be an outcome. A decision. And if the decision is the right one, the “question will never be asked again”.

Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Share on StumbleUpon
StumbleUpon
Email this to someone
email

Safely Customizing Genesis Child Themes with WP Clips

Jan 29 2016 ·Written by Jon Barratt

CUSTOMIZING GENESIS – A QUESTION OF ‘BEST PRACTICE’

Some time ago, I stumbled upon a YouTube video entitled “How to Safely Customize Your Genesis Child Theme”, in which Katrinah (katrinah.com) explained how to customize Genesis child themes using secondary custom files to protect customizations from theme updates.

As a fellow Genesis user and third-party developer, I saw Katrinah’s tutorial as a helpful resource for the Genesis community. However, I recently happened upon the video again to find the original content removed and several comments taking issue with adding secondary files over editing theme files directly. StudioPress support also weighed in, stating that Best Practice is to edit theme files directly because Genesis child themes do not get updated.

Well, this might be true of some StudioPress themes. However, many Genesis child themes do get updated, including StudioPress and third-party themes adapting to new technologies (e.g. responsiveness) or respecting new web protocols (e.g. accessibility), and those which integrate frequently-updated plugins (e.g. WooCommerce) which, in turn, necessitate theme updates.

Another limitation is WordPress multisite. Customizing the Genesis child theme’s native files restricts the developer to either network-wide customization using one theme, or multiple theme copies to customize each site. Alternatively, secondary custom files offer a simple, light-weight solution to target individual site customizations while using the single Genesis theme.

Check out my other article entitled, “You Don’t NEED to Update Your Genesis Child Theme … but SHOULD You?” for a deeper analysis of the Great Update Debate.

BENDING THE RULES, NOT BREAKING THEM

So, in view of the little debate above, here are a few considerations up-front –

  1. WP Clips uses secondary custom files.
    I believe there is good reason to abide by StudioPress’s Best Practice method. However, I also believe there is a place for adding secondary custom files, in particular for customizing Genesis child themes which offer updates or require ongoing customization.
  2. WP Clips is still extremely useful in combination with Best Practice.
    You can always transfer your code back to the theme’s native files. In this case, WP Clips offers both a helpful facility for massaging and testing your code, and an easily activated or deactivated back-up of your customizations.
  3. WP Clips is ideal for customizing with code.
    At just 10kb in size, the starter plugin contains little more than a folder of empty files. It’s not intended to replace more intuitive customizers such as Genesis Extender or Design Palette Pro. However, if you want to dive into code and get your hands dirty, WP Clips offers a great outdoor playground while keeping your home neat and tidy.
  4. WP Clips is ideal for customizing multisite environments.
    The multisite plugin enables customizations to be applied across the network or to individual sites using one Genesis child theme installation.

… if you want to dive into code and get your hands dirty, WP Clips offers a great outdoor playground while keeping your home neat and tidy.

PUTTING WP CLIPS INTO PRACTICE

So, you’ve installed your Genesis child theme and it’s time to start customizing. Well, here are some very simple steps:

  1. Download WP Clips from wpclips.net
    Note that multisite requires WP Clips Multisite plugin to be installed. Further information on using the multisite plugin can be found at wpclips.net/wp-clips-multisite
  2. Install and activate the plugin.
    Both plugins can be installed as must-use (mu-) plugins for best security.
  3. Now, dive in and start customizing.
    I won’t use this forum to expand on the how-to’s of customizing Genesis child themes. I’ll simply discuss in relation to WP Clips, and include some resources at the end.

    So, central to customizing with WP Clips are the custom files located in the wp-content/clips/clip-core/ and wp-content/clips/clip-custom/ directories – the core and custom Clips. These files include:

    core-functions.php – for WordPress core functions
    custom-functions.php – for theme/plugin custom PHP functions
    custom-script.js – for theme/plugin custom JS/jQuery scripts
    custom-style.css – for theme/plugin custom CSS styles

    Visit https://wpclips.net/customizing/ to learn about customizing with WP Clips.

  4. Life after customizing.
    If you are comfortable keeping your customizations within the active Clip (my preference), then start celebrating. You’re done! If, however, you wish to adhere to Best Practice, then carefully transfer the customizations across to your native theme files (adjust paths and parameters where required) and simply deactivate the plugin.

    Leave the plugin installed for future customizing and as a back-up should you ever need to restore or update the original child theme. Your customizations will be reinstated immediately upon reactivation.

    This is the practical advantage to using secondary custom files when customizing Genesis child themes. You can always return to basecamp in seconds. It’s not so easy when your customizations are scattered throughout the theme’s native files.

A FEW TIPS

Additional files and content
You can add and enqueue any required files and content within the custom Clip folders (e.g. images or lib folders, jquery plugins). There’s really no limit to how you use the Clip.

Customizing native theme files
Sometimes, it just makes good sense to customize native files directly. A log.txt plain text file is included within the Clip to record any such changes.

Translation
The WP Clips plugin itself is translation-ready and includes a /languages/wp-clips.pot file. If leaving the custom Clip active, this file can be updated at any time with a simple translation plugin (e.g. Poedit) to include all translatable custom text.

Changing to a must use (mu-) plugin
After development, you may want to consider transferring the plugin folder contents (not the plugin folder) to a new or existing /wp-content/mu-plugins/ directory. This will block access to custom files and prevent plugin deletion via WordPress admin. A good final safeguard before hand-over to a client.

Don’t stress and have fun
As I said before, WP Clips is like an outdoor playground for customizing Genesis themes. You can get your hands dirty, try new things, toss ideas in the air and see how they land, anything you like, always knowing that your fundamental theme remains unchanged.

FINALLY …

Please check out the WP Clips website wpclips.net. There is plenty of documentation and FAQ’s on how the plugin works and how you can tailor WP Clips to fit your needs. Also, learn about WP Clips Multisite, Precoded Clips and the new ClipBank™.

And remember, WP Clips is constantly being improved. So, please send us your feedback – maybe a new feature you’d like to see, or a different application you’ve discovered, or perhaps you’d simply like to weigh in on the ‘question of custom files’. Don’t be shy. Throw your comments our way!

Helpful Resources for Customizing Genesis Themes

StudioPress website (where it all starts) – www.studiopress.com
Brad Dalton’s WP Sites (awesome code snippets and tutorials) – wpsites.com
Sridhar Katakam (equally awesome code snippets and tutorials) – sridharkatakam.com
Carrie Dils (more awesome customizing Genesis info) – www.carriedils.com
Nick Davis’s Genesis Guide (keep up to date on all things Genesis) – genesiswp.guide
Chrome DevTools (learn how to use the inspector and other browser dev tools) – developers.google.com/web/tools/chrome-devtools/

Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Share on StumbleUpon
StumbleUpon
Email this to someone
email
  • WP Clips
  • WP Clips Multisite

© Copyright 2015 Krolyn Studios · Privacy Policy · Contact Us