Query Posts with Custom Taxonomy from a Custom Post Type

It looks like you forgot to set the field parameter to search for slugs: $args = array( ‘post_type’ => ‘advertisement’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘group’, ‘terms’ => array( ‘homepage’ ), ‘field’ => ‘slug’, ) ) ); Notice that the taxonomy query uses the term_id as the default search field. I would also use … Read more

Displaying custom post types with taxonomy

Follow these steps . Add the following code to your functions.php add_shortcode( ‘list-team’, ‘list_team_members’ ); function list_team_members( $atts ) { ob_start(); // define attributes and their defaults extract( shortcode_atts( array ( ‘type’ => ‘post’, ‘posts’ => 5, ‘category’ => ”, ), $atts ) ); // define query parameters based on attributes $options = array( ‘post_type’ … Read more