The pipe ( | ) and tilde ( ~ ) separator options for the title have been removed from Yoast SEO plugin version 17.1. As per Yoast, It was done because Google frequently replaces these symbols in search results. For more details, please visit the changelog of the Yoast SEO plugin version 17.1 https://yoast.com/yoast-seo-17-1/

Yoast SEO plugin version 17.1 options page without | and ~ separators

If you want to add these separators back in your site title, then you can follow the instructions below.

Coding method:

Here is how it will look after adding the | and ~ separators in option page

Copy and paste the following code snippet in your active theme’s functions.php file :

function wptips_add_old_separators($separators){
			$separators['sc-pipe']   = array(
				'option' => '|',
				'label'  => __( 'Vertical bar', 'wordpress-seo' ),
			);
			$separators['sc-tilde']  = array(
				'option' => '~',
				'label'  => __( 'Small tilde', 'wordpress-seo' ),
			);
	return $separators;
}
add_filter('wpseo_separator_option_list', 'wptips_add_old_separators');

Non-coding method:

You can add the pipe and tide symbol directly in the Yoast SEO page, post, or custom post title template section and add the symbols directly there.

  1. Under SEO, Go to Search Appearance section.

2. Now under the Posts, Pages, Taxonomy, or custom post type section, you can replace the separator variable with the symbol you would like to insert as the given image below.

3. You can do it in all the post types that you have on your site and click save, that’s it. You are done. No need to change anything in the code 🙂

Thanks to Niall Flynn for suggesting this non-coding solution in the comment section.

Let me know if you face any issues. You can comment below with your question or issue details.