Alt text not available
Wordpress

How to Add & remove custom ‘Yoast Breadcrumbs’ separator.

Follow These Two steps :
Put that code just at the end of  ‘functions.php’

  1. To remove the separator from the Yoast SEO plugin, you can use the following code snippet in your WordPress theme’s functions.php file:

    function remove_yoast_seo_separator() {
    return ”;
    }
    add_filter( ‘wpseo_breadcrumb_separator’, ‘remove_yoast_seo_separator’ );
  2. This code snippet uses the wpseo_breadcrumb_separator filter hook to remove the default separator and replace it with an empty string.
    To add your custom SVG separator, you can use the same filter hook to replace the default separator with your SVG code. Here’s an example code snippet:

    function custom_yoast_seo_separator() {
    return ‘<svg xmlns=”http://www.w3.org/2000/svg” viewBox=”0 0 24 24″><path d=”M11 15.5V8a1 1 0 1 1 2 0v7.5l3.5-3.5a1 1 0 0 1 1.4 1.4l-5 5a1 1 0 0 1-1.4 0l-5-5a1 1 0 0 1 1.4-1.4l3.5 3.5z”/></svg>’;
    }
    add_filter( ‘wpseo_breadcrumb_separator’, ‘custom_yoast_seo_separator’ );

    This code snippet uses an SVG code for a chevron-down icon as the separator. You can replace this SVG code with your custom SVG code to display your desired separator.

For any Query please comment below.

Techpd Profile Picture

"Experienced blogger skilled in HTML5, CSS3, JavaScript, SCSS, PHP, MySQL, React, and Next.js. Passionate about new tech and connecting with fellow engineers to collaborate and innovate."

    Order by :

    Leave a Reply

    Your email address will not be published. Required fields are marked *