This should be simple, but it escapes me.
I have a custom post type and a custom taxonomy. The taxonomy is named "asset_type" and the slug is "type"
I am using wp_list_categories
to provide a sidebar menu where users can click to view posts in the clicked taxonomy.
For example:
<div class="category-sidebar"><?php
$args = array('post_type' => 'design_asset', 'show_count' => 1, 'taxonomy' => 'asset_type');
wp_list_categories($args);
?>
</div>
This displays correctly my tax terms, for example, "element", with the link of http://site.dev/type/element/
It goes to the page, but I can't figure out how to modify my loop so it only shows posts that match the current term, in this example "element", nor display the title of the page as "Element".
My loop to display ALL the posts is:
$args = array( 'post_type' => 'design_asset', 'posts_per_page' => 100, 'orderby' => 'title', 'order' => 'ASC' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();