programming – how to get the tag id from the viewed tag page
-
hello,
iam trying to write a little plugin for my tag-archive, but i got some problems getting some informations in the programming:
My plugin has to check, if the viewed site is a tag-archive and if so, i need to get the “tag_id” from the viewed archives tag.
How can i get this information?
I found the functions:
get_query_var('tag'); get_query_var('tag_slug__and');
to get the tag_id/id`s, but when i use them in my plugin i receive nothing:
global $wp_query; echo get_query_var('tag_id');
The function is_tag() isnt working for plugins also.
How can i find out what the tag_id is?Can anyone help me please ??
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘programming – how to get the tag id from the viewed tag page’ is closed to new replies.