FindsGood

How to get the tag’s slug on the tag page in WordPress

learn How to get the tag's slug on the tag page in WordPress

You can get the slug by getting the queried object while on the tag page, like so:

<?php
$tag = get_queried_object();
echo $tag->slug
?>

<?php echo 'http://findsgood.com/'.get_queried_object()->slug.'/'; ?>


  • This page redirects from: