is_page_template doesn't work for custom post type templates
-
Hello,
I am using the code below in my sidebar.php to call different sidebars. However, it isn’t able to call the custom post type, movies, single-movies.php page template because it’s a custom post type. Is there a is_custom_post_type_template? Or something similar?
Thanks for all the help.
Jason
<?php if ( is_page_template('single-movies.php') ) { ?> <?php dynamic_sidebar( 'movies' ); ?> <?php } else { ?> Do other stuff <?php } ?>
[Please post code snippets between backticks or use the code button.]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘is_page_template doesn't work for custom post type templates’ is closed to new replies.