So I’m trying to get posts from a custom taxonomy’s category, which I’ve attempted 100 different ways, currently like this:
$posts = get_posts(array('tax_query' => array('taxonomy' => 'Products'), 'cat' => $item->ID));
the $item->ID is a valid category ID, which I’ve ran several tests on , so that isn’t the problem. The taxonomy is also really named “Products”, so that’s dead on. Am I doing something wrong? I need this done ASAP for my client.
- Sold between 250 000 and 1 000 000 dollars
- Community Moderator
- Author was Featured
- Author has had an Item Featured
- Bought between 100 and 499 items
- Referred more than 2000 users
- Has been a member for 4-5 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
Use tax_query parameter
wpCanyon, you’re a bro and all, but I already did. D:<
I know I had a couple of issues with custom taxonomies that were due to using a capital, so “Portfolio” threw issues whereas “portfolio” wouldn’t be a problem.
Just throwing that in there incase it’s any help.
Paul: You should make a show called “True Bro’d”. Anyways, didn’t work.
Well, I got that working. Now I MUST ask – how do you use query_posts to order posts by a meta field? I think it would work with WP Query but not with query_posts.