I'm facing a strange problem:
<?php $loop = new WP_Query( array( 'post_type' => 'ff', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => 10 ) ); while ( $loop->have_posts() ) : $loop->the_post(); ?> (...) <?php endwhile; ?>
This code displays all posts of "ff" type. Works fine.
But I do not want to list all posts of this type, I just want the ones that are in "ff_show" category (so the slug/term is "ff_show).
Codex tells me that I should use 'category_name' but when I do the loop is always empty:
<?php $loop = new WP_Query( array( 'post_type' => 'ff', 'category_name' => 'ff_show', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => 10 ) );
I've tried typing everything after 'category_name', nothing works.
The funny thing is when I use category instead of category_name - it ALWAYS shows all the posts. No matter what ID I give.
Am I doing something wrong?
I'm sure about my category name, it is exactly as I said.
When I login to my panel admin and go to categories and hover over one of them it points to:
BUT 'cat' => '19' shows nothing.