[resolved] Query on custom field that stores date data (2 posts)

  1. m1546
    Posted 3 years ago #

    I am using custom field (meta data) for storing date data and would like to query posts with regard to its value.
    Additional "issue" is that there could be more then one entry for that custom field, i.e. more dates (more that specific custom fields) for one post.
    Is it possible to retrieve all posts that have at least one date greater than some fixed date (for example today), without using data model, relations and sql? Just by using WP built-in functions or procedures.

    Thanks in advance for a advice.

  2. m1546
    Posted 3 years ago #

    This could be resolved by using 'meta_query' custom field parameter in query_posts() (where 'type' => 'DATE').
    The custom field data should be saved as date data type.

Topic Closed

This topic has been closed to new replies.

About this Topic