- This topic has 14 replies, 3 voices, and was last updated 3 years, 5 months ago by
Fernando.
-
AuthorPosts
-
February 27, 2022 at 4:34 pm #2135883
jorge
I found this thread but the screencasts are missing, any way to reupload them? i think i can figure it out, just needed to see how to configure these
https://generatepress.com/forums/topic/footer-sticky-bar/
What i would like is to have a call us button as well as a text us button incorporated into the bottom bar, not floating icons just something unobtrusive. I don’t mind hiding the copywright bar on mobile. I’d just want this bar to show up on mobile, not desktop. Thank you!
February 27, 2022 at 4:34 pm #2135884jorge
sorry, forgot url
February 27, 2022 at 4:44 pm #2135899Ying
StaffCustomer SupportHi Jorge,
You can create a block element, add the 2 buttons into it.
Set the block element type to hook, use
after_footer
as the hook name, choose location according to your needs.To hide the buttons on desktop, you can add
hide-on-desktop
class to the buttons:
https://wordpress.com/support/adding-additional-css-classes-to-blocks/February 27, 2022 at 4:58 pm #2135914jorge
Got it to work but buttons are one on top of the other rather than side by side
February 27, 2022 at 5:07 pm #2135926Ying
StaffCustomer SupportTry add this CSS:
.site-footer + .wp-block-buttons { display: flex; } .site-footer + .wp-block-buttons > * { flex: 1; }
February 27, 2022 at 5:21 pm #2135932jorge
That worked great, thank you. One last thing the buttons aren’t sticky as always being on the bottom of the mobile window. Also how do i hide the footer on mobile?
February 27, 2022 at 5:40 pm #2135947jorge
I figured out hiding the footer/copywright bar on mobile, just need help with the floating buttons on scroll, meaning i would like those two buttons to be always visible at the bottom. Thanks again!
February 27, 2022 at 6:25 pm #2135983Fernando Customer Support
Hi Jorge,
You can modify Ying’s code to something like this to make the buttons fixed at the bottom.
.site-footer + .wp-block-buttons { display: flex; position: fixed; bottom: 10px; right: 10px; z-index: 9999; } .site-footer + .wp-block-buttons > * { flex: 1; }
If you wish to have it sticky on mobile only, you may use this instead:
@media (max-width: 768px) { .site-footer + .wp-block-buttons { display: flex; position: fixed; bottom: 10px; right: 10px; z-index: 9999; } .site-footer + .wp-block-buttons > * { flex: 1; } }
Kindly let us know how it goes! 🙂
February 27, 2022 at 6:35 pm #2135987jorge
I actually would like buttons hidden on desktop , Tried the sticky on mobile code but the buttons are not centered, and the request quote lettering is stacked.
February 27, 2022 at 8:11 pm #2136037Fernando Customer Support
I actually would like buttons hidden on desktop
I can see that you’ve currently set it not to display on both desktop and tablet. Alternatively, here is a code for that as well:
@media (min-width: 769px) { .site-footer + .wp-block-buttons { display: none; } }
Tried the sticky on mobile code but the buttons are not centered, and the request quote lettering is stacked.
Can you try this code instead?
@media (max-width: 768px) { .site-footer + .wp-block-buttons { display: flex; position: fixed; bottom: 0; left: 50%; transform: translate(-50%,0); z-index: 9999; } .site-footer + .wp-block-buttons > * { flex: 1; } }
Hope this helps! Kindly let us know how it goes. 🙂
February 27, 2022 at 8:49 pm #2136049jorge
did not work, visit my site so you see what i mean.
February 27, 2022 at 9:08 pm #2136059Fernando Customer Support
Sorry about that. I mistakenly copied the previous code instead of the new code I tested.
Here it is:
@media (max-width: 768px) { .site-footer + .wp-block-buttons { display: flex; position: fixed; bottom: 10px; left: 50%; transform: translate(-50%,0); z-index: 9999; width: 90%; } }
This is what it looks like from my end: https://share.getcloudapp.com/L1uW08qL
Kindly let me know how it goes. 🙂
February 27, 2022 at 9:17 pm #2136069jorge
Looks like that worked, thank you!.
February 27, 2022 at 10:30 pm #2136110jorge
I will close this topic, thanks again!
February 27, 2022 at 10:55 pm #2136122Fernando Customer Support
You’re welcome Jorge! Glad to be of assistance! Feel free to reach out anytime if you’ll need assistance with anything else. 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.