Created
November 27, 2014 13:52
-
-
Save danielpataki/98af9ac2fcc2ce9d105a to your computer and use it in GitHub Desktop.
Title Tag Support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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