I created a tag view, and pulled that into WP-View widget. I see tags, and tag counts - great!
Then, with some effort, I got the archive to show those custom post types (in this case 'linecards') to show only those CPTs (linecards) that are tagged with what's selected from the widget (double great!)
What I CANNOT get to work is to show the tag name in the archive header.
So if I clicked 'mechanical', at the top of the archive page, I want it to say 'LineCards: Mechanical'
For the life of me, can't find what variables to read (get_tag_names, etc) - all coming up blank.
HELP! (and thx!)
Hi Mike,
What sort of archive is this? Is it a taxonomy archive like this - hidden link or is it a post archive like this - hidden link?
You might need to use:
$term = $wp_query->get_queried_object();
or
$post_type_object = $wp_query->get_queried_object();
Best regards,
Bruce.
<? php printf( __( 'Linecard Category: %s', 'mytheme' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?>
this worked - hope the php comes through. Boy was I surprised!