user1432966
user1432966

Reputation: 523

Advanced custom fields filtering with taxonomies

I'm working with AdvancedCustomFields and Taxonomies, and I don't find, in the documentation, something that allows me to filter the Taxonomies by the values stored on the wp_options table.

I found that here.

And, it could by something like this, but with Taxonomies:

I have a taxonomy called "Person", and I have many fields. For example, I would like to filter by sex and country.

Is there any function that allows me to do this? Or should I work with WP-Query?

Thanks in advance

Upvotes: 2

Views: 2839

Answers (1)

Jothi Kannan
Jothi Kannan

Reputation: 3358

Once you have registered the taxonomy with your post you may try with tax_query Query inside the your query_post

query_posts( array(  
    'post_type' => 'your post type', 
    'paged' => $paged, 
    'posts_per_page' => 10, 
    'tax_query' => array( 
        array( 
            'taxonomy' => 'person', //or tag or custom taxonomy
            'field' => 'id' 

        ) 
    ) 
) );

Upvotes: 1

Related Questions