get_posts sub taxonomies
-
Hi im reading the codex and found this example
If specifying a category from a custom post type then instead of using ‘category’ you would use ‘{your_custom_post_type}_category’. For instance, if you had a custom post type called “dogfood” and wanted to only show posts from the category “brand” you would use the below code.
<?php $args = array( 'numberposts' => 8, 'orderby' => 'rand', 'post_type' => 'dogfood', 'dogfood_category' => 'brand', 'post_status' => 'publish' ); $show_brands = get_posts ( $args ); ?>i tried to implement that in my site to make a list of the recent post, but i need a sub category of my custom taxonomy to stay in the example of the codex i need from dogfood only the “pedigree” brand how can i call it?
The topic ‘get_posts sub taxonomies’ is closed to new replies.