WordPress.org

Support

Support » Plugins and Hacks » Whats The Condtional Tag For Single Pages?

Whats The Condtional Tag For Single Pages?

  • I thought it was is_page but that also returns true for archives pages.

    I only need single pages without effecting archives page or any other page template.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael

    @alchymyth

    Forum Moderator

    I thought it was is_page but that also returns true for archives pages.

    if this happens in your site, then there is possibly something wrong with the main query or any custom query used in your archives page;
    page templates will of course return true for is_page() – so you might need to add further checks…

    http://codex.wordpress.org/Conditional_Tags

    please post more details, for instance a link to your site.

    I think i also need to add these as well

    if (is_page && !is_page_template() && !is_archive() && !is_category() )

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Whats The Condtional Tag For Single Pages?’ is closed to new replies.
Skip to toolbar