What I’m looking to do is build a shortcode to that will display a list of posts based on the taxonomy slugs passed to it. But as far as I can tell, you can’t use just a term’s slug to pull posts in without having to also specify the taxonomy it’s in.
Is it possible to get posts or other taxonomy based data (term meta, name, etc) with just the terms slug, and without the specific taxonomy it’s in?
If you look at source of
get_term()
it does hard check for taxonomy and for good reasons (caching, collisions, etc).I see two possible approaches:
search
orname__like
in multiple taxonomies usingget_terms()
and work with results