is_page_template Conditional is not working!
-
Hallo. I struggle really hard with the
is_page_templateConditional.
The problem is that when I “include” my template functions file (country_template_functions.php) into myfunctions.phpfile, theis_page_templateconditional doesn’t work anymore.
If I remove the “include template…” from myfunctions.phpit does work, but this is no solution since the file has to be included into the functions.php to make it working.Can anyone explain me what might be wrong?
The is_page conditional works in both cases.if (file_exists(THESIS_CUSTOM . '/country_template_functions.php')){ include(THESIS_CUSTOM . '/country_template_functions.php'); } function test() { if ( is_page_template( "country_template.php" ) ){ echo "is page template works"; } } add_action('thesis_hook_before_header','test');I am using the Thesis Theme.
The topic ‘is_page_template Conditional is not working!’ is closed to new replies.