WPFront Scroll Top
Adds a lightweight, accessible "Scroll to Top" button with customizable appearance, position and smooth-scroll behavior to improve navigation and UX.
Install in
Enhance user experience and site navigation with a lightweight, customizable “Scroll to Top” button. This plugin adds a smooth-scrolling button that appears as users scroll down the page and disappears when they return to the top.
Designed for speed and seamless integration, it works with any WordPress theme and includes options for custom icons, button position, color, animation, and intelligent display rules. No coding required—just install and configure in minutes.
Perfect for blogs, long-form articles, eCommerce sites, or any website where easy navigation improves usability.
Highlights
- Lightweight and performance-first back-to-top button — now 100% jQuery-free (vanilla JS + CSS only).
- Dependency-free, no external scripts needed.
- Smooth, configurable animation and positioning.
- Accessibility-minded (ARIA labels, keyboard support, screen-reader text) with SEO-friendly semantic markup.
- Modern SVG icon set — 28 bundled lightweight inline SVGs using
currentColorfor easy theming, with color/hover controls, visual grid picker and thewpfront_scroll_top_svg_iconsfilter; Font Awesome remains available for backward compatibility (deprecated). - Works with any theme; configurable per-page visibility with smart include/exclude rules.
Key Features & Customization
- Intelligent Display: Automatically appears as users scroll down, then disappears when at the top.
- Smooth Scroll Animation: Vanilla JavaScript with
requestAnimationFrameandeaseInOutQuadeasing; configurable scroll offset, duration, opacity and fade. - Flexible Destinations:
- Internal Page Scroll: Link the button to any specific element within the current page (configurable container selector and offset).
- External Page Redirection: Redirect users to any other page or URL.
- Customizable Button Design:
- Choose between SVG icons (28 bundled, grid picker — Recommended), text, custom image (PNG/SVG), or Font Awesome icons (deprecated, bundled locally).
- SVG icons scale with button size, use
currentColorfor automatic color theming, support icon color, hover color and custom CSS, and are extensible via thewpfront_scroll_top_svg_iconsfilter. - Use any image URL for complete branding control.
- Responsive Control:
- Mobile-Friendly: Option to hide the button on smaller devices/windows for better mobile UX.
- iFrame Compatibility: Ensures it doesn’t appear inappropriately within iframes.
- Targeted Visibility: Show or hide the button on specific pages/posts or keywords (
home,category,author,tag,search,archive) with autocomplete search. - Temporary Display: Auto-hide the button after a set duration for a cleaner interface.
- Accessibility Focused: Built with ARIA labels and screen reader text for inclusive navigation.
- SEO-Friendly Markup: Employs semantically correct HTML elements (
buttonoradepending on action) for optimal search engine and accessibility performance. - Optimized Performance: Small async JavaScript bundle and minimal CSS; SVG icons are inline with no extra request and respect CSS
color. Dynamic CSS optionally cached touploads/wpfront-scroll-top/style.csswith inline fallback for fast delivery. - Modern Admin Panel: Tabbed, searchable settings built with WordPress Components — grouped fields, color pickers, SVG/image grids, media-library integration and REST-powered page search.
- Caching-Plugin Aware: Automatically purges well known caches on save/activate/deactivate.
Written by Joobi from the project's own listing. See the source page
4.0.0
- Major rewrite — modern, dependency-free codebase for faster performance and long-term maintainability.
- Removed jQuery dependency: frontend now uses vanilla JavaScript with
requestAnimationFrame+easeInOutQuadsmooth scroll; smaller bundle and no jQuery conflicts. - Completely redesigned settings UI using WordPress Components: tabbed and searchable, grouped fields, color pickers, image grid, media-library integration and debounced REST search for pages.
- PHP 7.4+ and WordPress 6.0+ required; PSR-4 namespaced code with strict types and DI container (
src/). - Font Awesome now bundled locally under
assets/vendor/font-awesome/(previously maxcdn) and enqueued only when needed; handle renamed towpfront-scroll-top-font-awesome. - Frontend rendering changed from JS-injected markup on
window.loadto server-rendered markup. - Smooth-scroll supports custom container selectors, element offsets and multi-container targets; negative durations/offsets are clamped for safety.
- Dynamic CSS handling: base styles from
assets/bundle/scroll-top.cssplus dynamic rules cached touploads/wpfront-scroll-top/style.csswhen enabled (mtime-versioned, file viaWP_Filesystem) with inline fallback. - Page-display filter extended with keyword tokens
category,author,tag,search,archiveandhomenow matchesis_front_page() || is_home()(previouslyis_home()only); stored ID lists remain compatible. - Color validation widened to accept
rgba(),#RGBAand#RRGGBBAA; text/selector fields now sanitized withsanitize_text_field. - Lifecycle improvements: installer/updater with
wpfront-scroll-top-versionoption, update lock transient, dynamic-CSS regeneration on update, activation redirect and multisite-aware uninstall (removes settings, version option anduploads/wpfront-scroll-top/). - Caching: automatic purge for WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Fastest Cache, SG Optimizer, Breeze, Cache Enabler, FlyingPress and others on save/activate/deactivate; added
wpfront_scroll_top_clear_cacheaction. - Accessibility/SEO: semantic
button/acontainer,aria-label/title/screen-reader-texthandling preserved with empty-value skipping and default fallback. - Developer note: old globals and AJAX endpoint changed —
wpfront_scroll_top_data.dataflatwpfrontScrollTopData, andwpfront_scroll_top_submit_data(AJAX) REST; please update custom integrations.
3.1.0
- Added version switching between v3 (Legacy) and v4. An admin notice on the settings page allows administrators to toggle between versions with a single click.
- New installations now default to v4. Sites with existing settings continue to use v3 (Legacy) unless switched.
- Font Awesome is now marked as deprecated in the v3 settings UI; existing Font Awesome configurations continue to work.
- Minimum requirements updated to WordPress 6.0 and PHP 7.4.
3.0.1
- Defect fix.
3.0.0
- Breaking changes are introduced. Please verify the display after the upgrade.
- These breaking changes are needed for accessibility and SEO friendly markup.
- The container will either be a button or an anchor element.
- There could be multiple span inside the container depending on your configuration.
- Minimum PHP version required is 7.2.
- Accessibility and more CSS settings are available.
- Deprecated settings are removed.
2.2
- Compatibility fixes.
2.1.1
- Bug fix.
2.1
- [Deprecated] Small device settings.
- New UI.
- Title HTML attribute.
- PHP compatibility fixes.
- HTML validation fixes.
- Performance improvements.
2.0.7
- XSS fix. Thanks to ‘Vlad Visse’.
2.0.6
- XSS fix. Thanks to ‘Asif Nawaz Minhas’.
2.0.5
- XSS fix.
2.0.4
- WP compatibility fix.
2.0.3
- jQuery deprecation fixes.
- Compatibility fixes.
- SiteGround conflict fix.
2.0.2
- Fixes WordPress 5.2 site health, wp_version_check, conflict.
2.0.1
- Link to element.
- Link to page.
- Select image from media library easily.
- Performance improvements.
1.6.2
- Requires minimum PHP 5.3.
- Bug fixes.
- Moved menu under ‘Settings’ menu.
- PHP 7.2 compatibility fixes.
1.6.1
- Undefined variable fix.
1.6
- Font Awesome icons support.
- New image icons.
- Setting for moving menu under ‘Settings’.
- Performance improvement.
- UI improvement.
- PHP 7 compatibility fixes.
1.5
- JavaScript async.
- Minified files.
- Language files removed.
1.4.5
- Ukrainian translation added. Thanks to Ivanka Skakun.
1.4.4
- Zerif theme compatibility fix.
1.4.3
- Media upload bug fix.
1.4.2
- Bug fixes.
- German language added.
1.4.1
- Bug fixes
- Russian language added
1.4
- Image ALT attribute
- Language translations
1.3
- Auto hide
- Hide on wp-admin
- Hide on iframes
- Pages/posts filter
1.2
- Text button option
- Bug fixes
1.1.1
- Stability improvements
- New menu structure
1.1
- New option to hide on mobile devices
- Fixed conflicts with other plugins
1.0.1
- Bug fixes
1.0
- Initial release
Follow this listing's changes (Atom feed)