Archived topic
Remove the "Back to top" button on specific page...
1 reply · Started by Yannick on May 25, 2022
Hi!
Any hook I can use to remove the "Back to top" button on specific pages?
I'm using it on all pages, but would like an option to remove it on 1 or 2.
Hi Yannick,
1. Go to appearance > elements, create a new hook element.
2. Add this code to the content area:
<?php remove_action( 'generate_after_footer', 'generate_back_to_top' );?>
3. Tick the Execute PHP box, select wp_headas hook.
4. Choose the pages that you want to disable back to top in the display rules > location.
Once the Hook element is published, it should remove the back to top for chosen pages.
Check this screenshot as reference: https://www.screencast.com/t/zyhk9ODe
Let me know :)