Finally got a shortcode working that does part of what I’d like.
add_shortcode( 'tax_description', function() {
ob_start();
$taxonomy = 'your-custom-tax'; // Replace 'your-custom-tax' with the actual taxonomy slug
// Get the taxonomy object
$taxonomy_object = get_taxonomy($taxonomy);
// Get the taxonomy description
$taxonomy_description = $taxonomy_object->description;
// Output the taxonomy description echo $taxonomy_description;
return ob_get_clean();
} );
What I’d like to do is dynamically fetch & pass the argument ‘your-custom-tax’ from the taxonomy of the current archive being displayed.
Thanks so much.