WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. lexhair
    Member
    Posted 7 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
    Member
    Posted 7 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

Tags