wp-content » themes » functions.php » How to add the | separator back in Yoast SEO plugin

How to add the | separator back in Yoast SEO plugin

The pipe ( | ) and tilde ( ~ ) separators are removed from Yoast SEO plugin 17.1. It was done because Google routinely alters these symbols in search results, according to Yoast: https://yoast.com/yoast-seo-17-1

image 6 - How to add the | separator back in Yoast SEO plugin
Yoast SEO plugin without | separator

To add these separators back to yoastSEO plugin, simply add the following inside your active theme function.php file:

function wpxss_add_separator($separators){
            $separators['sc-pipe']   = array(
                'option' => '|',
                'label'  => __( 'Vertical bar', 'wordpress-seo' ),
            );
    return $separators;
}
add_filter('wpxss_separator_option_list', 'wptips_add_separator');

and under Search Appearance the pipe symbol will be available again:

image 7 - How to add the | separator back in Yoast SEO plugin
Yoast SEO plugin with | separator
See also  Top 5 WordPress GDPR plugins in 2023

Was this post helpful?

Leave a Comment

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.

Recommended