The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

is_page () to check if a specific template is displayed (2 posts)

  1. lexhair
    Posted 9 years ago #

    I want a conditional statement which checks if a user template and not the default template is in use for the displayed page. If the user template "yourname.php" is in use, it want different code executed than if "page.php" is in use.

    If the Template is called "yourname", will is_page('yourname') return a true?

    Thanks in advance.

  2. lexhair
    Posted 9 years ago #

    Thanks to trial and a lot of error, the is_page call I tried did not return a true.

Topic Closed

This topic has been closed to new replies.

About this Topic