Tagged: breadcrumbs, enfold, yoast breadcrumbs
-
AuthorPosts
-
October 28, 2022 at 1:56 pm #1370559
We are having trouble displaying the correct breadcrumb path for WooComerce products.
I tried various solutions:
1. Primary category plug-in application
https://codecanyon.net/item/woocommerce-product-primary-category-plugin/19642775?_ga=2.159255866.1608430433.1666954925-1558367430.1646238385However, 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.
October 30, 2022 at 9:15 pm #1370728Hey 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,
MikeOctober 31, 2022 at 8:25 am #1370754My 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.
October 31, 2022 at 1:29 pm #1370804Hi,
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() { ?> <script> window.addEventListener('DOMContentLoaded', function() { (function($){ var wpseo_breadcrumb = '<?php echo do_shortcode("[wpseo_breadcrumb]"); ?>'; $('.breadcrumb.breadcrumbs.avia-breadcrumbs').replaceWith('<div class="breadcrumb breadcrumbs avia-breadcrumbs">' + wpseo_breadcrumb + '</div>'); })(jQuery); }); </script> <?php } add_action('wp_footer', 'replace_avia_breadcrumb_with_wpseo_breadcrumb');
Please check
Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.