WordPress.org

Ready to get started?Download WordPress

Forums

How to get next post by post date using custom conditions? (2 posts)

  1. faeronsayn
    Member
    Posted 1 year ago #

    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?

  2. faeronsayn
    Member
    Posted 1 year ago #

    Anyone have an idea?

Topic Closed

This topic has been closed to new replies.

About this Topic