Anchors

#320790
  • Resolved woozym
    Rank Math pro

    Hello,

    I have a problem with the anchors.

    Normally, when you click on an anchor, it is written at the end of the URL as follows: “#anchor”

    https://website.fr/#anchor

    Yet when I click on the anchors, it doesn’t show up behind the URL as it should.

    However, if I open it in a new tab, this time it appears behind the URL.

    How to change that?

    I made a little demo video.
    https://streamable.com/rdi4hl

    Cordially

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

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    This issue doesn’t seem to concern Rank Math as our plugin doesn’t fiddle with fragments or anchor hashtags in your URL.

    Can you please disable Rank Math plugin temporarily and observe if the behavior of your URL is still the same? You may follow this troubleshooting guide so your live users will not be affected by it.

    Let us know how that goes. Looking forward to helping you on this one.

    Hello Jeremy,

    Thank you for that answer.

    Actually, I know it’s not the plugin that’s causing this problem. It existed before I installed it. But I had the hope that you would know why this is so.

    I am new to WOrdpress and had this problem before. Also, most websites don’t have this problem.

    It seems to be related to worpdress.

    Thank you anyway,

    Have a nice evening.

    Hello,

    By default, the anchor hashtags so shouldn’t be removed once you click the link. This issue of yours might be caused by your theme or other plugins. You may check that by following the guide I shared in the previous reply.

    Once you determine which plugin or the theme causing that behavior, you can contact their support.

    Let us know how that goes. Looking forward to helping you.

    Hello Jeremy,

    Ok, I will read this guide and see if I find some solution. And then I’ll let you know.

    Thank you

    Azib Yaqoob
    Rank Math business

    Hello,

    Please let us know how that goes. If you have any other questions please don’t hesitate to contact us again.

    We are looking forward to helping you.

    Thank you

    Hello Sorry for the delay. Yes, I will come back to let you know.

    I guess the problem is with the DIVI theme but when I asked them they weren’t very clear. I have to come back to them to try to clarify this and hope to find a solution.

    Thanks for your interest.

    I come back to you to keep you informed.

    Regards,

    Hello I could solve the problem but when I try to explane you how, the message is blocked. Ok never mind.

    You were right, it came from the DIVI theme.

    I had to enter a code to correct. Unfortunalty I tryed to communicate you the code but the system block the message.

    I must say that the first time I asked them, the assistant I had come across did not know how to answer me.

    Thank you very much. You helped me a lot!

    Regards,

    Indy

    Ok, so I just managed to enter the code without being blocked, I had to remove the “script” tags.

    So, this code must be written in:

    DIVI < Theme Options < Integration

    —————————————————

    jQuery(document).ready(function() {
    jQuery(‘.menu-2a’).click(function(){
    let hash = jQuery(this).attr(‘href’).split(‘#’)[1];
    window. location. hash = hash;
    });
    });

    —————————————————

    Regards,

    Indy

    Anas
    Rank Math business

    Hello,

    Thank you for sharing the code and we are glad the issue is resolved.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)

The ticket ‘Anchors’ is closed to new replies.