Archived topic
Back to top button replaced by fixed button at page bottom
9 replies · Started by Adrien on February 25, 2022
Hello,
I'd like to see the Back to top button replaced by fixed button at the page bottom (on the Footer).
Is this possible? Thank you for your help.
Hi Adrien,
This should be possible, through a filter. For instance, see this code by David here where the custom PHP code replaces the back to top button with an Image: https://generatepress.com/forums/topic/back-to-top-button-change/#post-1829477
If you could send a screenshot/image of the look you’re going for, if it’s not too complicated, maybe we can assist you with regards to this.
Kindly send the link to the site in question as well if you’ll need further assistance with regards to this.
If however, you wish to add a fixed button that’s visible all the time unlike the back to top button, you could probably hook a button to after_footer, and we can add CSS to make it fixed. :)
Kindly let us know. :)
Thanks Fernando. Actually it's not about the look of the button or where to place it, it's about how to create it. What link/code would bring me back to top if placed on footer? What code should I enter to have this functionality?
Thank you for your help
I see. If you simply need this to appear, no code is needed. The option to enable this functionality can be found by going to Appearance > Customize > Layout > Footer.
See: https://share.getcloudapp.com/04uLpz4N
Also see: https://docs.generatepress.com/article/back-to-top-button/
Hope this helps! :)
mmm we have a miscommunication here. I know all this. Been using GP for years. Here's my site.
I would like to place a back to top link FIXED on my footer. I can't use the default way because I have a beacon on the right side of my page.
I'm simply asking what code should be placed to go Back to top of the page.
Thanks for your assistance.
I see, sorry for the misunderstanding.
If you want it fixed in the footer, you can add a button with a link “#” in the footer bar section through Appearance > Widgets.
See: https://share.getcloudapp.com/P8u6Lz2y
You may also opt to place it in the Footer widgets if you prefer.
A side note: You can still add it through the default way, and we can move it via CSS to the left side if you prefer it behaving like a default back to top.
Hope this helps! :)
Thank you Fernando but then how to keep the smooth-scroll?
Hi there,
in your HTML for the anchor link give it a class of: smooth-scroll
Then enable the Smooth Scroll option in Customizer > General.
Hello David and Fernando,
Thank you very much, it works like a charm. Appreciate your help always.
Glad to hear that!