How to retrieve tag slug in header
-
For category pages, I provide an rss link in the header, using the following code:
if (is_category()) { $cat_obj = $wp_query->get_queried_object(); $cat_slug = $cat_obj->category_nicename; ... }
I would like to do this for tag pages as well. Apparently get_queried_object() does not apply to tag pages, so it looks like I’d have to take a completely different approach. If someone could point me to the solution, I’d sure appreciate it!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to retrieve tag slug in header’ is closed to new replies.