Created
May 6, 2017 20:24
-
-
Save redrambles/12601682cb91488ddf9a4632005b938b to your computer and use it in GitHub Desktop.
Add title description
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 skillcrushstarter_setup() { | |
// Post thumbnails support | |
add_theme_support('post-thumbnails'); | |
// Register Menus | |
register_nav_menus ( array ( | |
'primary-menu' => __( 'Primary Menu', 'skillcrushstarter' ), | |
'secondary' => __( 'Secondary Menu', 'skillcrushstarter' ), | |
) ); | |
// Let WordPress take care of outputting the title | |
add_theme_support( 'title-tag' ); | |
// but change the separator from '-' to '|' | |
function skillcrushstarter_custom_title_separator($sep) { | |
$sep = '|'; | |
return $sep; | |
} | |
add_filter('document_title_separator', 'skillcrushstarter_custom_title_separator'); | |
} | |
add_action( 'after_setup_theme', 'skillcrushstarter_setup' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment