Stuck on trying call an option variable using the Redux Framework - that is utilizing multi-category select - inside the query. Here's what I have as my query:
$the_query = new WP_Query(array(
array( 'category__and' => $my_options['featured_section'] ),
'posts_per_page' => 1
));
while ( $the_query->have_posts() ) :
$the_query->the_post();
This doesn't work. The output of $my_options['featured_section']
is:
Array ( [0] => 20 [1] => 16 )
I have two categories selected in the options area, which are ID 20, and ID 16. Any idea why this won't call the correct categories?
cat
would be wrong. If that is not the result you see something is interfering, maybe a filter, but I can't guess what.$my_options['featured_section']
is not an array but a comma separated string, which conflicts with what you've said.