goddelose
goddelose

Reputation: 21

Wordpress title-tag function

need help.. I'm learning to build a wordpress theme by own self and i'll change separator -to | if use functionadd_theme_support( ‘title-tag’ );. as far as I know it can be if use wp_title()function.

Upvotes: 0

Views: 41

Answers (1)

Akash K.
Akash K.

Reputation: 637

Since version 4.1, developers are discouraged to use wp_title() function. So you should ignore that part for now.

For changing separator using title-tag you can use the following filter:

add_filter('document_title_separator', 'my_custom_separator');
function my_custom_separator($sep){
    $sep = '-';
    return $sep;
}

Upvotes: 1

Related Questions