| 开发者 | ericakfranz |
|---|---|
| 更新时间 | 2026年11月1日 08:05 |
| PHP版本: | 4.7 及以上 |
| WordPress版本: | 7.1.0 |
| 版权: | MIT |
| 版权网址: | 版权信息 |
.back-to-top) to add the music and smooth scroll to the link you already have.
Customize Elevator
You can also customize the appearance of Elevator with CSS. Need help? See the Elevator Style Guide.
Credits
Elevator by Erica Franz. Plugin page: fatpony.me/plugins/elevator.
Elevator.js created by Tim Holman.
Plugin repo banner background by Luigi Anzivino, licensed Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.
Elevator relies on the wp_footer() hook. If your theme doesn't include this tag somewhere (it is most commonly found in the footer.php template file, just before the closing body tag), then Elevator cannot work its magic. Check your theme first if Elevator's 'Back to Top' button isn't appearing on the page after you've activated the plugin.
The music starts when a visitor clicks the link, which browsers generally allow. If there is no sound, the cause is usually one of these:
Go to Settings > Elevator > Back to Top Link. You can either uncheck "Add the Back to Top link to the bottom of every page", or enter the CSS selector of your theme's link (for example .back-to-top or #scroll-top) in "Use my own link". Elevator will then play the music and scroll to the top when that link is clicked. If your theme's link has its own scrolling script, you may also need to turn that off in the theme.
Yes. Use these filters, which override the settings:
elevator_output_button - return false to stop Elevator adding its link.elevator_button_selector - return a CSS selector for the element Elevator should attach to.add_filter( 'elevator_output_button', '__return_false' );
If your 'Back to Top' button is loading, but the Elevator seems to be broken and stuck in the basement, check for JavaScript errors in your browser's console. You can use Google Chrome's Dev Tools for this. If you're unfamiliar with checking for JavaScript errors in your browser, I suggest you check out Julie Pagano's JavaScript Debugging for Beginners article. If your site is generating a JavaScript error, it's possible for it to conflict with Elevator and I suggest you resolve the JavaScript error before proceeding with any other troubleshooting.
elevator_output_button and elevator_button_selector filters.