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.

Alt text not available

"As a seasoned blogger, I bring expertise in HTML5, CSS3, JavaScript, SCSS, jQuery, PHP, MySQL, React, and Next.js to my articles. Continuously expanding my skill set, I'm passionate about exploring new technologies. Eager to engage with fellow software engineers, I invite connections from the community. Let's collaborate and innovate together!"

    Order by :

    Leave a Reply

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