breadcrumb home link URL issue with WPML

#554369
  • Resolved Anonymous
    Rank Math free

    my site installed with WPML 4.6.1 and RankMath 1.0.110.2

    When I use RankMath breadcrumb in the post/page, the breadcrumb homelink is always pointed to the primary language even when I am in a secondary language page.

    My site URL structure for WPML is
    https://mydomain.com/ –> primary language URL
    https://mydomain.com/en –> secondary language URL

    The expectation is homelink points to https://mydomain.com/en when I in english page.

    I tested yoast breadcrumb and the homelink works for the correspondent language. I want to know if it is able to fixed. thank you.

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

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    In this case, please try this filter on your site:

    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    	if (function_exists('wpml_home_url')){
            $crumbs[0][1] = apply_filters( 'wpml_home_url', get_option( 'home' ) );
        }
    	return $crumbs;
    }, 10, 2);

    And here’s a guide on how to apply a filter on your site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how this goes.

    Thank you.

    Anonymous
    Rank Math free

    Hi Thanks for the reply. I applied the filter and the breadcrumb homelink is still sticking to the primary language URL while I am in different language pages. I use shortcode [rank_math_breadcrumb] to insert the breadcrumb.

    About this issue, is this a known behavior for the current RankMath version?

    Hello,

    I’ve tried checking the staging site connected to your account, but it seems that the breadcrumbs are disabled.

    Also, we have not received similar concerns regarding the Breadcrumbs on WPML.

    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/

    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.

    Thank you.

    Anonymous
    Rank Math free

    HI is there any update about the issue? thank you

    Anonymous
    Rank Math free

    Hello,

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

    Thank you.

    Hello,

    Apologies for the delay as this ticket seems to have been stuck in our drafts section for some reason.

    I’ve tried logging in to your site, but it seems that the login link is already expired. Could you please check and update it so we can investigate further?

    Looking forward to helping you.

    Thank you.

    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 6 replies - 1 through 6 (of 6 total)

The ticket ‘breadcrumb home link URL issue with WPML’ is closed to new replies.