Looper Provider based on field value

Is it possible to determine a looper provider based on a field value of a post type.

For example:
I want the provider to be a specific post type and show only posts that have “status”(custom field) = “active”(field value) AND “type”(custom field) = “sale”(field value).

It would be like the Taxonomy option, except singling out posts with specific field values instead.

Hi @marketfresh,

Thanks for reaching out.
Regretfully, there is no such option available in Looper Provider, but you can use the Custom option to call a custom method that will help you to get the data inside it. Please find the following thread which may help you on this.


@kory posts were definitely getting me closer to what I wanted.

Here’s exactly what I’m trying to do:

Basically I want to use 2 meta key values (both need to be true so it needs to be AND, not OR) to determine which posts to show, and one of the values needs to be not “Closed”.

Does this make sense, and is it even possible?

I think I figured it out after looking a little harder at some of @kory’s posts.
Here’s what I did:

$query = array(
  'post_type'           => 'listing’,
  'post_status'         => 'publish',
  'orderby'             => 'date',
  'order'               => 'DESC',
  'meta_query'           => array(
    'relation' => 'AND',
      'key' => 'ffd_status',
      'value'    => 'Closed',
      'operator' => 'NOT IN',
      'key' => 'ffd_listingtype',
      'value'    => 'Sale',
      'operator' => 'IN',

var_dump( http_build_query( $query ) );

Here’s the output:

Hi @marketfresh,

We’re glad that you’re able to figure it out. If you have any other concerns regarding our theme features, feel free to reach us.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.