WordPress.org

Ready to get started?Download WordPress

Forums

Using more than one 'meta_compare' in query vars (1 post)

  1. moikirsch
    Member
    Posted 2 years ago #

    I'm trying to filter my query with a custom post type setting the following query vars:

    $wp_query->query_vars['meta_key'] = 'vence';
    $wp_query->query_vars['meta_compare'] = '<';
    $wp_query->query_vars['meta_value'] = date('Ymd', current_time('timestamp'));

    This works perfectly. My problem is that I would like to add a second set of meta_keys to compare.

    Does anyone know how to do this?

    Moises

Topic Closed

This topic has been closed to new replies.

About this Topic