This will show you an easy way to add a scroll to top link in WordPress.
This is very useful if you have long pages and users on mobile devices that need to get back to the top of your site with one click.
Coding is one way to do this but using a plugin makes it simpler and means that if you change themes you keep this functionality without having to do any complex editing.
How to add a scroll to top link in WordPress
This excellent plugin works on long pages and makes it easy for your visitors to scroll to the top of the page on your WordPress website.
The Plugin: WPFront Scroll Top
Once the plugin is activated go to WP Front >> Scroll Top.
The only thing you have to do here is enable the plugin and click the Save button. It also lets you choose an icon, exclude certain pages and various other options. I find it works great with the default settings.
Now you have a scroll to top link on your WordPress site that works on desktop machines and mobile devices.