Yoast SEO
[Plugin: WordPress SEO by Yoast] Where to set separator character? (3 posts)

  1. Adwiz
    Posted 3 years ago #

    Version of WordPress SEO puts %%sep%% into all the title boxes, which makes a certain amount of sense. But it says "The separator defined in your theme's wp_title() tag." and I can't find that reference, even after doing a full search in all the theme files. Where does that go, and if a theme doesn't define wp_title(), how do I define it?


  2. milian
    Posted 3 years ago #

    In yoast titles settings you can just replace %%sep%% with the character you want to use


    etc. Try that.

  3. kellydc3
    Posted 3 years ago #

    In your WordPress template put your desired sep (separator) in the wp_title() tag. So if you want to use the pipe | character, your wp_title should look like:


    This is usually in the head.php file of your theme. Most likely between the <title></title> HTML tag.

    For my themes, I use the following PHP which can be used conditionally with or without SEO by Yoast:

    	### Print the <title> tag based on what is being viewed.
    	global $page, $paged;
    	if(defined('WPSEO_URL')){ // If Using WordPress SEO Yoast - let it override
    	} else {
    		wp_title( '|', true, 'right' );
    		// Add the blog name.
    		bloginfo( 'name' );
    		// Add the blog description for the home/front page.
    		$site_description = get_bloginfo( 'description', 'display' );
    		if ( $site_description && ( is_home() || is_front_page() ) ) {
    			echo " | $site_description";
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 ) {
    		echo ' | ' . sprintf( __( 'Page %s', 'Test Theme' ), max( $paged, $page ) );

    The above will allow you to use the %%sep%% designation in SEO by Yoast and use your own separator character.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic