• Ok i have a very unusuall problem that i can’t resolve…
    I’m building a complex search that i need for my website that searches terms in taxonomy and custom fields in custom post type. I have made a WP_Query for that but no matter what i can’t figure out what is the problem with my code

    $args = array(
    	'post_type' => 'automobili',
    	'meta_query' => array(
    		array(
    			'key' => 'cijena',
    			'value' => array(1000, 10000),
    			'type' => 'numeric',
    			'compare' => 'BETWEEN'
    		)
    	),
    	'posts_per_page' => 10
    );
    
    $query = new WP_Query( $args );

    I’m using post type “automobili” that should query post type “cijena” on values between 1000, 10000… This is very simple query of what i need but this doesn’t work in my search

  • The topic ‘WP_Query’ is closed to new replies.