- This topic has 13 replies, 6 voices, and was last updated 7 months, 1 week ago by
David.
-
AuthorPosts
-
March 6, 2019 at 8:44 am #830702
Ivan Cazorla
Hi there,
I’ve got filters for price, categories and more on my left sidebar, but in mobile the sidebar displays after the content, so there’s no way users can use the filters for searching a product.
Is there any way to display the sidebar before the conent in mobile?
https://www.deacampada.com/categ/tiendas-de-campana/por-tipos/
Thanks,
IvanMarch 6, 2019 at 9:08 am #830728David
StaffCustomer SupportHi there,
try this – it will apply to any pages with a sidebar:
@media (max-width: 768px) { .left-sidebar .site-content { display: flex; flex-direction: column-reverse; } }
or this will target on the woocommerce archives.
@media (max-width: 768px) { .archive.woocommerce.left-sidebar .site-content { display: flex; flex-direction: column-reverse; } }
March 7, 2019 at 8:33 am #831900Ivan Cazorla
it works, thanks!!
March 7, 2019 at 9:16 am #831935David
StaffCustomer SupportYou’re welcome
July 8, 2020 at 7:50 am #1356665Sarah
Is there a way to get the archive title to still display above the sidebar for this?
July 8, 2020 at 9:17 am #1356763David
StaffCustomer SupportHi there,
Yes, if you use a Header Element to to display the archive title, this will appear above the content / sidebar
https://docs.generatepress.com/article/header-element-overview/
July 27, 2022 at 12:01 pm #2295446Eugene
Hi David
Sorry for digging this one up. This CSS tweak is causing CLS issues in Pagespeed.dev and I’m wondering if there is perhaps a quick solution for this?
I tried adding the CSS as high up as I could but it still flashes the main content first
See 2 screenshots:
https://prnt.sc/wudpuGlD3L2w
https://prnt.sc/6r3BVtFaI3cdYour help would be highly appreciated
July 27, 2022 at 3:08 pm #2295529Ying
StaffCustomer SupportHi there,
Can you open a new topic and link us to your site?
You can use the private info field to send us your site link 🙂
December 16, 2022 at 5:25 am #2464031Ioannis
Hello, reviving this old thread, I am facing the exact same issue but neither solution seems to have any affect on my mobile view. If I should have started a new thread let me know. I am using custom left sidebars for navigation, which are different for each category, could this be the reason the code does not work?
I am using the latest versions for WP, woocommerce, GP plugin and theme.
The website is https://kidzbooks.gr
December 16, 2022 at 5:41 am #2464063David
StaffCustomer SupportHi there,
this CSS should work:
@media (max-width: 768px) { .left-sidebar .site-content { display: flex; flex-direction: column-reverse; } }
Where did you add it ? Can you try adding it before any other CSS ?
December 16, 2022 at 6:22 am #2464107Ioannis
Hi David, I was adding it to the custom css section at the customizer, right at the bottom. When I pasted it at the top of the list, even above GP’s declarations, it worked.. I thought about adding “!important” flags but I didn’t see any conflicts.. Anyway, it is fine now, thank you very much, you’ve been very helpful, as always.
December 16, 2022 at 6:34 am #2464119David
StaffCustomer SupportGlad to be of help
February 18, 2023 at 4:28 am #2537787George
Where to add this CSS? I tried adding it on “Additional CSS” customizer but it doesn’t work, the right sidebar still shows at the bottom of the page.
Also, does the “Additional CSS” on the customizer apply to one page or the entire site’s pages?
February 18, 2023 at 6:46 am #2537888David
StaffCustomer SupportHi there,
try this CSS for the right sidebar:
@media (max-width: 768px) { .right-sidebar .site-content { display: flex; flex-direction: column-reverse; } }
And Additional CSS in the Customizer will apply to the entire site. But that CSS rule will only apply to pages with a Right Sidebar.
If that don’t work, then please raise a new topic and share a link to your site so i can take a closer look
-
AuthorPosts
- You must be logged in to reply to this topic.