In framework settings:
$options[ 'featured_cat' ] = array( "name" => "Featured Category",
"desc" => "Featured Posts will display in the main rotator on the homepage.",
"id" => $shortname."_cat_featured",
"type" => "select",
"options" => $woo_categories);
Updated w/ category in the settings, and it wont populate, the argument in theme is:
$rotator_args = array(
'posts_per_page' => $woo_options[ 'woo_featured_count' ],
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'category',
'terms' => array( $woo_options[ 'woo_cat_featured' ] ),
'field' => 'ID',
'operator' => 'IN'
),
array(
'taxonomy' => 'post_format',
'terms' => array( 'post-format-video', 'gallery' ),
'field' => 'slug',
'operator' => 'NOT IN',
),
)
);
It doesnt work when it’s the default like that, or when I changed the settings to be what I wanted them to be (2 different category selectors).
but it does work when I simplify it to:
$rotator_args = array(
'posts_per_page' => $woo_options[ 'woo_featured_count' ],
);
Also If I just leave the 'post_format'
section in the 'tax_query'
, it works.
Can anyone explain why woo_cat_featured wouldn’t populate.
Checked already
- there exist posts for that category
- the CSS is fine
- I’m in the process of starting over,
- It used to work once, then just stopped working,
- server issue?
- It used to work once, then just stopped working,
Working version, using the working code without the tax_query, on a customized framework.
link
(the backend and half the admin section randomly stopped working too, so I’m starting over).
The new version:
link
So I fixed it by changing
to
Specifically:
to
.
I’m not sure what changed from one theme to the other. But this made it work perfectly.