Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created October 7, 2021 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/3b0487a025306da5f4535677c59e9f12 to your computer and use it in GitHub Desktop.
Save Pebblo/3b0487a025306da5f4535677c59e9f12 to your computer and use it in GitHub Desktop.
Example of how to load a 'espresso_content-none.php' file in place of your standard content-none.php template file.
<?php // Do not include the opening PHP tag.
add_action("get_template_part_content-none", 'tw_ee_espresso_content_none', 10, 2);
function tw_ee_espresso_content_none($slug, $name) {
if(
$slug === 'content'
&& $name === 'none'
) {
add_filter("FHEE__EEH_Template__get_template_part__display__content_none", '__return_false');
espresso_get_template_part('espresso_content', 'none');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment