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 –
- 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.
- 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.
- 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.
- 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:
- 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
- Install and activate the plugin.
Both plugins can be installed as must-use (mu-) plugins for best security.
- 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-clips/clip_core/ and /wp-clips/clip_custom/ directories – the core and custom Clips. These files include:
core-functions.php – for WordPress core functions
custom-functions.php – for theme-related custom PHP functions
custom-jquery.js – for theme-related custom jQuery scripts
custom-style.css – for theme-related custom CSS styles
There is also a vitals.php file in the custom Clip which can be used to declare compatible themes and required plugins for the Clip to activate. This is helpful in preventing site errors and irregularities when switching themes.
You can add code and edit these custom files with your usual code editing software (recommended), or via the Plugins > Editor in WordPress admin (take the Clip Shortcuts).
Visit http://wpclips.net/customizing/ to learn more about customizing with WP Clips.
- 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.
Power-up the Plugins > Editor
If you use the Plugins > Editor in WordPress admin, why not add some helpful features like syntax highlighting and line numbers. I suggest installing the WP Ace Edit Precoded Clip from ClipBank™ or WP Lab’s Ace Edit plugin for syntax highlighting and other features.
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.
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!
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/