Forums

is_page_template problems & the sidebar (1 post)

  1. mrfletch
    Member
    Posted 1 year ago #

    I'm trying to streamline my WordPress website, and for love nor money I can't get is_page_template to work in my sidebar.php file.

    This is the code I have placed in sidebar.php and loaded via <?php get_sidebar(); ?>

    <?php if ( is_front_page() ) { ?>
    <h3>Front Page</h3>
    <?php } else if(is_page_template('event-page.php') || is_single()) { ?>
    		<h3>Event Page or Single</h3>
    <?php } ?>

    This conditional works on the front page, and on the single pages. It just doesn't work on the file which is named event-page.php.

    Any thoughts? Could really use some help.

    Thanks,
    Paul

Topic Closed

This topic has been closed to new replies.

About this Topic