How to determine if URL param is a taxonomy query var?
-
Hi all,
I’m attempting to check if one or more URL parameters correspond to an existing WP taxonomy. For example if my URL ends with ?tag=abc,xyz&foo=bar, I need to check whether each of those parameters is a taxonomy; in this case ‘tag’ is, and ‘foo’ is not.
Problem is the taxonomy query variable (tag) might be different from the taxonomy name (post_tag). I am stumped as to how to find out if a taxonomy exists based on its query variable, not its name.
taxonomy_exists() or get_taxonomy() seem to only work with the taxonomy name.
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to determine if URL param is a taxonomy query var?’ is closed to new replies.