WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Highlight most recent post in a query (3 posts)

  1. Justin Carroll
    Member
    Posted 3 years ago #

    I'd like to highlight the most recent post in a query. Right now I'm checking for the first post, but I can't do that on page 2 because that would be wrong. How do I highlight my most recent post? Thanks!

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    combine your check for the first post with the is_paged() conditional tag:

    hypothetical example:
    if( $first_post && !is_paged() )

    http://codex.wordpress.org/Function_Reference/is_paged

  3. Justin Carroll
    Member
    Posted 3 years ago #

    Excellent, thanks! Topic closed! :)

Topic Closed

This topic has been closed to new replies.

About this Topic