Skip to content

Instantly share code, notes, and snippets.

@redrambles
Created May 6, 2017 20:24
Show Gist options
  • Save redrambles/12601682cb91488ddf9a4632005b938b to your computer and use it in GitHub Desktop.
Save redrambles/12601682cb91488ddf9a4632005b938b to your computer and use it in GitHub Desktop.
Add title description
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