WordPress if page is or is not not a specific template name

Do something if page is a specific template name <?php if(is_page_template( 'specific-template.php' )): ?> /*HTML or PHP can go here*/ <?php endif ?> Don't do this if page is a specific template name <?php if(!is_page_template( 'specific-template.php' )): ?> /*HTML or PHP can go here*/ <?php endif ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.