Woo Framework: woo_cat_featured not populating

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:

Read More
$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

  1. there exist posts for that category
  2. the CSS is fine
  3. I’m in the process of starting over,
    • It used to work once, then just stopped working,
      • server issue?

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

Related posts

Leave a Reply

1 comment

  1. So I fixed it by changing

    array(
        'taxonomy' => 'category',
        'terms' => array( $woo_options[ 'woo_cat_featured' ] ),
        'field' => 'ID',
        'operator' => 'IN'
    ),
    

    to

    array(
        'taxonomy' => 'category',
        'terms' => array( $woo_options[ 'woo_cat_featured' ] ),
        'field' => 'slug',
        'operator' => 'IN'
    ),
    

    Specifically:

        'field' => 'ID',
    

    to

        'field' => 'slug',
    

    .

    I’m not sure what changed from one theme to the other. But this made it work perfectly.