Answer the question
In order to leave comments, you need to log in
How to change the title of custom posts?
Hello. For all pages on the site, the title looks like this: Page title | Name of the site. There is a custom post type - portfolio and a page with the same address. There is an archive-portfolio.php page. But on such pages the title looks like this: Page Title - Site Title. Those. through dash. Can this be fixed somehow?
Answer the question
In order to leave comments, you need to log in
So no one suggested it. Decided to change the default separator.
add_filter( 'document_title_separator', function( $sep ) {
return '|';
} );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question