Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 112916

vtxyzzy on "Get all posts from categories"

$
0
0

I think you will get what you want if you change this:

'category_in' => array($category->term_id),

to this:

'category__in' => array($category->term_taxonomy_id),

Note the double underscores in 'category__in'. Also, a given term might belong to more than one taxonomy, so you need to use term_taxonomy_id instead of just term_id.


Viewing all articles
Browse latest Browse all 112916

Trending Articles