WordPress.org

Ready to get started?Download WordPress

Forums

Is there an is_template tag? (3 posts)

  1. Tyssen
    Member
    Posted 8 years ago #

    I was just reading the Codex article on Dynamic Menu Highlighting and to get it to work for my site I had to do something like this:
    if ( is_page('2') || is_page('6') || is_page('8') || is_page('9') || is_page('11') || is_category('3') )...
    All those pages are linked to the one template. It would've been much easier if I could've done something like:
    if ( is_template('such&such')) ....
    Does such a tag exist for WP or does anyone know of a way to accomplish what I want to do a bit more simply than I've done so far?

  2. maestro42
    Member
    Posted 8 years ago #

    I was searching for this same question and was wondering if anyone had overlooked this and it is possible? Can anyone comment on this ? thanks!

  3. maestro42
    Member
    Posted 8 years ago #

    anybody know an answer to this ? or if it can be done? or if possible can a plugin be written ?

Topic Closed

This topic has been closed to new replies.

About this Topic