I haven’t found the right thing with google. But I think you can easily answer that:
I have added a custom post type: name: “portfolio” registered taxonomy for the category: “portfolio_category”
On the Front Page I want the latest portfolio items of a SPECIFIC CATEGORY (e.g. ID 5 ) to be displayed, but it doesn’t work with the normal “cat” like in the example below. It’s also not possible to write “portfolio_category” instead of “cat”.
How can I fix that?
Try something like
$args=array("post_type" => "portfolio","tax_query" => array(array("taxonomy" => "portfolio_category","field" => "id","terms" => $cat))); query_posts($args); while ( have_posts() ) : the_post(); .... endwhile; wp_reset_query();
where $cat is an array. In your case array(5)
- Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
- Open a support ticket if you would like specific help with your account, deposits or purchases.
- Item Support by authors is optional and may vary. Please see the Support tab on each item page.
Most of all, enjoy your time here. Thank you for being a valued Envato community member.