Archived topic
How To Customize Sidebar Layout In Woocommerce Pages
3 replies · Started by Matthew on July 8, 2021
So im trying to figureout the way or option to have my sidebar stack first before the main content (in mobile view).. works on common posts/pages.. but apparently when it comes to woocommerce pages/product pages it wont?
Hi Matthew,
Any chance you can link us to the site in question?
You can use the private information field.
And can you share the code that you are using to achieve this for posts/pages?
Let me know :)
Well i interchaged the code fetching the sidebars inside the page.php and the single.php, but cant figureout where does the woocommerce getting the layout.. even changing those file?..
get_header();
generate_construct_sidebars();
?>
<div id="primary" <?php generate_do_element_classes( 'content' ); ?>>
You can give this CSS a try:
@media (max-width: 768px) {
.woocommerce .site .sidebar {
order: -1;
}
}