Last active
November 24, 2015 11:35
-
-
Save talentedaamer/81574d819c34fe3fd2de to your computer and use it in GitHub Desktop.
Right way to use <title> tags in WordPress themes. add_theme_support( 'title-tag' );
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
<?php | |
/* | |
* call the oopthemes_after_setup function when theme is initialized. | |
*/ | |
add_action( 'after_setup_theme', 'oopthemes_after_setup' ); | |
function oopthemes_after_setup() { | |
/** | |
* Add support for the <title> tags. | |
* @since WordPress 4.1 | |
*/ | |
add_theme_support( 'title-tag' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment