• This is really one of the best implementations of functionality….thanks for the share.

    For my custom theme, I would like to check for the plugin and disable/enable it for specific conditions. In looking through the code, I can hack it for sure — but am curious if you have built in a specific way of doing this?

    I figure I could change the settings on the fly somehow to be “disabled”, but not sure if this would be a good way of doing things.

    Any suggestions?

    Thanks

    https://wordpress.org/plugins/scroll-back-to-top/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author joesexton00

    (@joesexton00)

    I haven’t implemented a way to selectively enable/disable the button per page, but in the next release I can add a filter for the enabled/disabled status to allow the theme to disable when needed.

    One way to pull this off would be to simply add a CSS property “display: none !important” for the .scroll-back-to-top-wrapper.show selector. While not ideal, this would work without hacking the plugin.

    Thread Starter johnmontfx

    (@johnmontfx)

    Thanks man — for the suggestion. Should have thought of that. That’s probably quite a bit easier than de_queing all the files…and then having to change the code when I update.

    A filter would be AWESOME…

    The plugin is really nice…coding is clear as well 🙂

    Plugin Author joesexton00

    (@joesexton00)

    On second thought, there is a filter available, “sbtt_button_markup” which is the filter for the HTML markup of the button, you could add a filter and return “” to essentially remove the button. Doing that will not remove the styles or javascript, but the button won’t show.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘wp_dequeue_script?’ is closed to new replies.