Contains site specific custom code.
The purpose of this plugin is to enable users to safely update child themes without losing customizations made to the child theme. Since WordPress doesn't support grandchild themes (for good reason), this is one way to allow users to add custom PHP, CSS and JavaScript that won't be overwritten if a child theme is updated.
- Go to Plugins > Add New.
- Type in the name of the WordPress Plugin or descriptive keyword, author, or tag in Search Plugins box or click a tag link below the screen.
- Find the WordPress Plugin you wish to install.
- Click Details for more information about the Plugin and instructions you may wish to print or save to help setup the Plugin.
- Click Install Now to install the WordPress Plugin.
- The resulting installation screen will list the installation as successful or note any problems during the install.
- If successful, click Activate Plugin to activate it, or Return to Plugin Installer for further actions.
Place any custom PHP in the custom-functions.php
file.
This file is loaded on the after_setup_theme
hook so most theme functions will work.
To load more custom PHP files, add the file path and name to the customizations_add_functions
function list in customization.php, e.g:
$files = array(
'custom-functions',
'more-custom-functions',
);
This will automatically load all files in the array.
Custom templates should be added to the templates directory as well as the
list of templates inside the customizations_add_templates
function, e.g:
$custom_templates = array(
'custom-template.php' => 'Custom Template',
'another-custom-template.php' => 'Another Custom Template',
);
Custom JavaScript should be placed in the custom-scripts.js file. There is an example function provided in this file.
Any custom CSS should be placed in custom-styles.css.