Skip to content

Instantly share code, notes, and snippets.

@danielpataki
Created November 27, 2014 13:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpataki/98af9ac2fcc2ce9d105a to your computer and use it in GitHub Desktop.
Save danielpataki/98af9ac2fcc2ce9d105a to your computer and use it in GitHub Desktop.
Title Tag Support
function theme_slug_setup() {
add_theme_support( 'title-tag' );
}
add_action( 'after_setup_theme', 'theme_slug_setup' );
if ( ! function_exists( '_wp_render_title_tag' ) ) :
function theme_slug_render_title() {
echo '<title>' . wp_title( '|', false, 'right' ) . "</title>\n";
}
add_action( 'wp_head', 'theme_slug_render_title' );
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment