Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #1370559

    We are having trouble displaying the correct breadcrumb path for WooComerce products.

    I tried various solutions:

    1. Primary category plug-in application

    However, it does not work with enfold and does not compare the display of the breadcrumbs category hierarchy. Works in other templates.

    2. Yoast SEO breadcrumbs
    This is the second solution that I tested. I found the code on the forum:

    The code works fine and so does breadcrumbs. There is a screenshot in the private message.

    However, this code does not replace or remove breadcrumbs from enfold. My goal is for yoast breadcrumbs to replace basic breadcrumbs for enfold.


    Hey creativeopole,
    Thank you for your patience, perhaps I can help you use the Yoast breadcrumbs and hide the Enfold breadcrumbs, in your screenshot I see the Yoast breadcrumb is above the Enfold breadcrumb container and I assume this is where you want the Yoast breadcrumbs.
    Please link to your page so I can evaluate a solution.

    Best regards,


    My goal is for the Yoast breadcrumbs to display exactly in the place of the enfold breadcrumbs.

    Because the solution I found causes both breadcrumbs to display.


    Thanks for the login to your site, I added this function to replace the avia-breadcrumbs with your wpseo_breadcrumb shortcode:

    function replace_avia_breadcrumb_with_wpseo_breadcrumb() { ?>
    window.addEventListener('DOMContentLoaded', function() {
          var wpseo_breadcrumb = '<?php echo do_shortcode("[wpseo_breadcrumb]"); ?>';
    	  $('.breadcrumb.breadcrumbs.avia-breadcrumbs').replaceWith('<div class="breadcrumb breadcrumbs avia-breadcrumbs">' + wpseo_breadcrumb + '</div>');
    add_action('wp_footer', 'replace_avia_breadcrumb_with_wpseo_breadcrumb');

    Please check

    Best regards,

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.