WordPress.org

Support

Support » How-To and Troubleshooting » How to get next post by post date using custom conditions?

How to get next post by post date using custom conditions?

  • How can I get the next post or a previous post by post_date using custom conditions.

    So let’s say

    if (my condition && my other condition) {
    get next post
    }

    This could work with WP_Query because I could say, query all posts from this meta_key, but then it queries “all” the posts. Instead of grabbing the next post from post date.

    Either way, how can I accomplish this?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to get next post by post date using custom conditions?’ is closed to new replies.