Select current category slug
-
Hi There,
I’m working on a custom theme that’s using the TDO Tag fix plugin to allow for filtering posts based on category then tag.
In the theme, I’ve created a custom category template that then links through to the appropriate tag filed under each category – for example
Current Page URL:
https://xxx.com/category/Link to tag filter:
https://xxx.com/category/?tag=blahI need a way of being able to dynamically output the current category slug for use in linking through the tags.
Something like <?php echo get_query_var(‘slug’); ?>
Although obviously that doesn’t work (<?php echo get_query_var(‘tag_id’); ?> does for the tag ID though though for example)
I’ve spent a couple of hours looking for a solution to what I though was a pretty simple issue – maybe I’ve just overlooked something pretty simple.
Thanks!
- The topic ‘Select current category slug’ is closed to new replies.