Skip to content

Instantly share code, notes, and snippets.

@barryhughes
Last active December 31, 2015 02:19
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 barryhughes/7919788 to your computer and use it in GitHub Desktop.
Save barryhughes/7919788 to your computer and use it in GitHub Desktop.
<?php
// If there's a taxonomy
if ( is_tax() ) {
$term = get_queried_object();
if ( $term ) {
$tax = get_taxonomy( $term->taxonomy );
$title = single_term_title( $tax->labels->name . $t_sep, false );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment