Support

Account

Home Forums General Issues Select posts by Category && Custom Field? Reply To: Select posts by Category && Custom Field?

  • It’s a select.

    What I would ideally like is a copy of the Category widget (just with Brands instead), but I can’t seem to get my head around it. So therefore I’m trying to use a custom field instead, but I’m having serious trouble figuring out how to retrieve post using multiple ‘parameters’.

    I’ve been trying something in this direction:

    
    $args_jewellery = array(
    	'post_type' => 'jewellery',
    	'category' => $category,
    	'numberposts' => -1,
    	'meta_query' => array(
    		array(
    			'key' => $brand
    			// 'compare' => 'EXISTS'
    			)
    	)
    );