Conflict Woodmart theme and Rank Math Breadcrumbs

#756884
  • Resolved Javi24
    Rank Math free

    Hello,

    I have now a conflict Woodmart theme and Rank Math Breadcrumbs, woocommerce shop page not load more products if I have this Rank Math breadcrumbs code(Woodmart Child function PHP):

    How to fix that?

    /**
    * Rank Math breadcrumbs
    */
    function woodmart_current_breadcrumbs( $type ) {

    $function = ( $type == ‘shop’ ) ? ‘woocommerce_breadcrumb’ : ‘woodmart_breadcrumbs’;

    if ( function_exists( ‘rank_math_the_breadcrumbs’ ) ) {

    rank_math_the_breadcrumbs();

    } else {

    $function();

    }
    }

Viewing 15 replies - 1 through 15 (of 16 total)
  • Hello,

    I apologize for the issue you are facing with the conflict between the Woodmart theme and Rank Math Breadcrumbs affecting the WooCommerce shop page’s product loading.

    To resolve this conflict, you can modify the function in your Woodmart Child theme’s functions.php file to ensure compatibility with Rank Math Breadcrumbs. Here is the updated code snippet for the function:

    /**
     * Rank Math breadcrumbs
    */
    function woodmart_current_breadcrumbs( $type ) {
        if ( function_exists( 'rank_math_the_breadcrumbs' ) ) {
            rank_math_the_breadcrumbs();
        } else {
            $function = ( $type == 'shop' ) ? 'woocommerce_breadcrumb' : 'woodmart_breadcrumbs';
            $function();
        }
    }

    By updating the function in this way, you can maintain compatibility with Rank Math Breadcrumbs while ensuring that the correct breadcrumbs function is called based on the page type.

    If you encounter any further issues or need additional assistance, please feel free to reach out to us by replying to this ticket. We are here to help!

    Thank you for bringing this concern to our attention.

    Sources:
    How to Enable Breadcrumbs on Your Website With Rank Math SEO » Rank Math
    How to Make Your Theme Rank Math Compatible » Rank Math
    How to Fix “Invalid object type for field ‘item'” » Rank Math
    Multilingual SEO with Rank Math SEO & WPML » Rank Math

    Javi24
    Rank Math free

    Hello,

    I adding this code but problem is same, not loading more products:
    https://vimeo.com/918904649/ad18c12ab4?share=copy

    Hello,

    Thank you for your query, and we are so sorry about the trouble this must have caused.

    In this case we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    Here’s is how you can share your WordPress login URL by using the “Temporary Login Without Password” plugin: https://i.rankmath.com/v/BbufYj

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Javi24
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    We would like to check the issue but the temporary login URL you shared leads to an error “This site can’t be reached”. Can you please verify so we can continue debugging the situation?

    Looking forward to helping you.

    Javi24
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Javi24
    Rank Math free

    Hello,

    Could you please review the issue again?

    Hello,

    Please confirm from where you got that code. That’s not the correct way to add our breadcrumbs. You will have to add the breadcrumbs code to the product-image.php and archive-product.php files to add the breadcrumbs without conflicting with your theme’s functionality. Here is a guide that can help: https://rankmath.com/kb/breadcrumbs/

    Please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    In this case, kindly contact the support folks from Woodmart theme as they know best the structure of their theme. They should be able to assist you in inserting the breadcrumbs code in the desired location.

    Looking forward to helping you.

    Javi24
    Rank Math free

    Hello,

    Woodmart support says:

    “There is no built-in option to use this breadcrumbs in our theme. And this custom solution seems to be not compatible with all our theme features, unfortunately.”

    i.e. Rank Math does not fit the Woodmart theme and they recommend Yoast.

    Hello,

    We are sorry to hear that.

    This solution is as simple as adding one line of code in the right area of your theme file. You should notice that our breadcrumbs are displayed fine initially so there’s no issue when installing our breadcrumbs to their theme. It is just added to the undesired position.

    I would suggest checking with their theme supports again and requesting on which specific line should you add the breadcrumbs code to display it in the desired position.

    If Woodmart can’t help you with that, please revert back here and we’ll try to fiddle with the theme files and resolve this as best as we can.

    Looking forward to helping you.

    Javi24
    Rank Math free

    Woodmart support says:

    We don’t have such code but if you want to customize the breadcrumbs function in our theme you can find it in the file inc/template-tags/template-tags.php. PHP function is called woodmart_current_breadcrumbs

    Hello,

    We have found a way to implement our breadcrumbs by replacing the entries for the function woodmart_current_breadcrumbs() with rank_math_the_breadcrumbs().

    We performed that change in the place for pages to test this and we can see our breadcrumbs being applied on a test page such as this one: https://test.javicar.ee/eritellimus-puittooted/

    If there are missing replacements on layout files you may need to replace the function with ours to make sure the breadcrumbs come from Rank Math.

    We tried to check all instances of the function but it’s possible that some are missing due to the sheer number of different implementations done by the heme.

    Don’t hesitate to get in touch if you have any other questions.

    Javi24
    Rank Math free

    Hello,

    It seems that now rankmath shows breadcrumbs correctly on the page and on the product page, but how would it be possible to put it on the product category page as well.

    https://prnt.sc/5AdxiW1CTUnD

    Thank you!

    Javi24
    Rank Math free

    Hello,

    I see on the test site display page on a single product page rank math breadcrumbs. But if I add this code on the live site then displays only on the page rank math breadcrumbs.
    inc/template-tags/template-tags.php I change code woodmart_current_breadcrumbs() to rank_math_the_breadcrumbs()

    How to add a category page and a single product page too?

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 15 replies - 1 through 15 (of 16 total)

The ticket ‘Conflict Woodmart theme and Rank Math Breadcrumbs’ is closed to new replies.