• langsuyar

    (@langsuyar)


    I’m feeling stupid for not being able to find this in the Codex anymore – what’s the conditional tag to determine whether the blog page is on its first page of posts or on an archived page? I’m pretty sure there was a way to use that information, and is_front_page() doesn’t work correctly for this.

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

    (@michaelh)

    Do you mean the Conditional Tag is_archive?

    Thread Starter langsuyar

    (@langsuyar)

    is_archive doesn’t catch it, no.

    Just to elaborate, I’m doing this

    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=-21&showposts=6&paged=$page"); ?>

    I rely on WordPress to do pagination after 6 posts, and I want to do a condition that displays different content when I’m on the first page of posts. This always displays “First blog post page!”:

    <?php
    if( is_archive() ) echo "Not first blog post page!";
    else echo "First blog post page!";
    ?>

    Hmm, might be the way query_posts() is set up above?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conditional tag for 1st page of blog’ is closed to new replies.