Scroll top anchor no longer working

I’ve been using this feature for a long time now, but recently the button in my footer no longer works. To be clear, the button is there, but clicking on it does nothing. It used to work fine.

To check it, I’ve turned it off, then back on again, changed its position from right to left, and back again, saving and testing at every step. Still doesn’t work. Help!

Hello @fiberdreams

Thanks for writing to us

This could be caused by a plugin conflict or JS customization please follow these troubleshooting steps:

In case If it doesn’t help, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts.

Thanks

I will do this later today, and let you know. Thanks!

Hi @fiberdreams,

Please let us know how it works for you.

Thanks

I have performed the suggested tests, and even when everything is off, and my website looks a fright (LOL), I’m getting the same symptom: the scroll top anchor… doesn’t.

I will create a temporary admin profile and password momentarily, and provide it to you securely.

Hello @fiberdreams,

The issue is caused of your custom JS code that you have added in wp-content/themes/x/header.php file. You had this:

<script type="text/javascript" src="https://payhip.com/payhip.js?v=24u68984"></script>
<script type="text/javascript">
     var PayhipConfig = {
        enableCart: true
    };
</script>

I have removed this code because it is incorrect way of adding custom Javascript. The right way should be added in the child theme or by using a 3rd party plugin like “Insert Headers and Footers” plugin.

Check your site now.

Okay! Well then. Thank you so very much for solving that mystery for me!

If that tiny bit of javascript isn’t there, then the cart system doesn’t work, and I cannot sell directly from my site. And no, don’t suggest woocommerce, as it’s secure for selling PDFs, which is what I do.

I’ll look into the suggested plugin, as there isn’t a place in the child theme to insert this plugin to get it to work.

It works! I installed a plugin (Woody), told it to install the js in the header, and viola! Not only does the Payhip cart work, but so does the scroll top anchor.

Thank you!!!

Hello @fiberdreams

Glad that things are well for you

Have a great day!
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.