[resolved] Condition for "only on page 1 but not page 2" (3 posts)

  1. thelaw
    Posted 4 years ago #

    I don't see the following in the codex:

    If on page 1 of results but not on page 2. For example, let's say you have a category page with 5 pages of posts results. You can say the same for a post with 4 additional pages of text. Is there a conditional that says "show on the first page but on the remaining pages."

  2. Michael
    Forum Moderator
    Posted 4 years ago #

    <?php if( !is_paged() ) : ?>
    page 1 only output
    <?php endif; >


  3. thelaw
    Posted 4 years ago #

    SUPERB! Many thanks!!!! Couldn't find this one...

    One note -

    Add question mark at end of last endif tag.
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic