Support » Fixing WordPress » is_page_template conditional not working for me

  • Hi,

    I am trying to print out h1s using WP as a CMS. I have a blog page too and want that to show up with the h1 “news”. Using conditional tags has worked great up until I tried to add one more using is_page_template (because I’m using a flickr plugin and can’t identify the page any other way) and that doesn’t seem to work.

    I have the page printing out the template used at the bottom and that matches up but the h1 doesn’t print out as “photo gallery” as I want it too.

    Any suggestions – code for h1s from my header.php below and the site is


    <h1><?php if (is_page_template('photoalbum-photo.php')) {
      echo "Photo Gallery";
    } elseif (is_front_page()) {
      echo "Ipswich 375: Home";
    } elseif (is_page()) {
    } else {
      echo "News";
  • The topic ‘is_page_template conditional not working for me’ is closed to new replies.