• Resolved shaunandrews

    (@shaunandrews)


    My index page has two loops. The first loop only shows one post from one category, sort of a sticky post implementation. My question is how can I have this post show for only a certain amout of time, say 5 days.

    Here’s my query:

    WP_Query('category_name=news&showposts=1')

    So basically I want to use some logic to only show the post if its date falls within the last 5 days.

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘HOWTO: Show a post for only 5 days’ is closed to new replies.