Use the coupon code BLACKFRIDAY40 and save 40% OFF! Buy Now

Knowledge base

The Ignition Framework templating system

The Ignition Framework extends the default WordPress template hierarchy by adding an extra search path for each search template.

For example, when a user visits a single post WordPress searches for a single.php template file in the following locations in order: child theme (if available) > parent theme. On Ignition Framework themes the search path becomes: child theme (if available) > parent theme > Ignition Framework Plugin. If the template file is not found in any of these paths WordPress then falls back to a more generic template, such as the singular.php in this case and repeats the search in the same manner child theme (if available) > parent theme > Ignition Framework Plugin.

All template files provided by the Ignition Framework plugin live in the /wp-content/plugins/ignition/template-files/ folder. You can check out this image to get a visual presentation of the framework’s template files and structure.

Overriding templates and template parts

Example 1: Let’s say you need to override the index.php template file and are using the Convert theme. Looking in the theme’s root folder you will notice there is a index.php file, so you need to copy this file from /wp-content/themes/ignition-convert/ to the child theme’s root folder at /wp-content/themes/ignition-convert-child/ and edit the copied file to achieve the appearance you are after.

NOTICE: If you are indeed planning to edit the index.php file make sure you know what you are doing and won’t cause unexpected changes, because the index.php file is the base template file used by WordPress, all template searches fall back to it if no other suitable alternative is not found, as can be seen in the template hierarchy visual here.

Example 2: In this example we want to spice up the 404 page template. Looking among the Convert theme files we notice that there is no 404.php file, this means we need to look in the framework plugin’s template files. All framework template files live in the /wp-content/plugins/ignition/template-files/ folder. Indeed there is a 404.php file here. We need to copy that file to our child theme, preserving any folder structure, but omitting the /template-files/ folder. In this case the 404.php file will be copied to the child theme’s root folder at /wp-content/themes/ignition-convert-child/ and can then be modified.

Example 3: For this example we are looking to modify the discography listing item on the Beat theme. The layout of the item is provided by a template part (a file that contains code which might be used multiple times on a template or shared across more than one templates). The template part lives under /wp-content/themes/ignition-beat/template-parts/item-ignition-discography.php copy the file over to the /wp-content/themes/ignition-beat-child/template-parts/ folder and you are ready to proceed with customizations.

Example 4: Finally let’s say we need to modify the appearance of the artist listing template part on Beat. If we look in the /template-parts/ folder of Beat we see there’s no related file, our next search location is the /template-files/template-parts/ folder of the Ignition Framework plugin, however there’s no template part there either. This means that the listing item gets its layout from the item.php file in the /template-parts/ folder of the plugin. We need to copy this file in the /wp-content/themes/ignition-beat/template-parts/ folder and rename it to item-ignition-team.php (the team post type is the one used to present the artists). Now we can edit its content and all changes will be reflected just on the artist listing items.

ATTENTION: Avoid directly editing any theme or plugin template files because all modifications will be lost when the theme/plugin are updated. Always prefer using a child theme to preserve your changes.

Get access to all WordPress themes & plugins

24/7 Support Included. Join 115,000+ satisfied customers.

Pricing & Sign Up

30-day money-back guarantee. Not satisfied? Your money back, no questions asked.

Back to top