Skip to content

Add Scroll Back to Top of page Functionality in WordPress

How to add a scroll back to top of page in WordPress? – I am sure there are a dime a dozen tutorials and plugins on this subject – here is the solution I went with.

jQuery scrollToTop was my choice of poison, download and install the scrollToTop.min.js file in your theme’s js folder and create an init file with the following…

Name it scroll-init.js and also move the init file to your theme’s js folder…

Enqueue these files by adding this to your functions.php

Now create the echo out the HTML link tag also add to functions.php

And some CSS for your style.css to get the party started…

1 Comment

  1. Dallin on October 1, 2016 at 6:27 am

    Thanks for writing so many great articles. Keep up the good work!

Leave a Comment





Scroll To Top