• Hi trying to use the is_page_template function in my if statement but can’t get it to work

    <?php $pageslug = $post->post_name;
    
              if ( ( ($pageslug == 'brochure-websites') || ($pageslug == 'template-websites') || ( is_page_template('single-portfolio.php') ) || ($pageslug == 'contact') ) ) { ?>								
    
      <div id="banner-small">
    
            </div><!--banner-small-->
    
             <div class="banner-footer"></div><!--end banner-footer-->
    
             <?php } ?>

    The values using the pageslug work fine but the if statement does not work for the ( is_page_template(‘single-portfolio.php’) )

    Any ideas?

    Thanks

  • The topic ‘Using is_page_template in an if statement’ is closed to new replies.