Skip to content

Instantly share code, notes, and snippets.

@saltnpixels
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saltnpixels/edec8e3ff71cb2128a4c to your computer and use it in GitHub Desktop.
Save saltnpixels/edec8e3ff71cb2128a4c to your computer and use it in GitHub Desktop.
global $wp_query;
$term = $wp_query->get_queried_object();
$title = $term->taxonomy;
//var_dump $term to see all the stuff you can get
//if its a tag we want Tag not post_tag.... its the slug...
if($title == 'post_tag'){
echo 'Tag';
}
else{
echo ucwords( $title);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment