Support

Account

Home Forums General Issues WP_Query with taxonomy field

Helping

WP_Query with taxonomy field

  • Hi friends!
    I’m using ACF, great plugin!
    I have a question:
    My site posts have several field. Screenshot: https://prnt.sc/q4pue1
    2 fields have a choice of taxonomy, multiple choice
    How to write a WP_Query request so that the selection would be for posts that that have selected taxonomies?

  • This not forking

    $args = [
    		'posts_per_page' => - 1,
    		'meta_query'     => [
    			'relation' => 'AND',
    			[
    				'key'     => 'cities_start1',
    				'value'   => [4,11,34],
    				'compare' => 'IN',
    			],
    			[
    				'key'     => 'cities_finish2',
    				'value'   => [3,12],
    				'compare' => 'IN',
    			],
    		]
    	];
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.