-
AuthorPosts
-
June 12th, 2019 at 13:08 #78800
Hi,
I’m using Nirvana. The theme has a sidebar by default in all woocommerce pages.We can override the behaviour of individual pages like Checkout, Cart and Account by defining a specific layout page template on that page.
But this is not possible for the other woocommerce pages. I only want to remove the sidebar on the single product page, and not on the shop page.
How can I do that ?(working with the woocommerce.php and wocommerce-nosidebar.php files will affect both the shop page AND the single product page, which is not what I want…)
Thank you !
June 12th, 2019 at 13:08 #78488Hi,
I’m using Nirvana. The theme has a sidebar by default in all woocommerce pages.
We can override the behaviour of individual pages like Checkout, Cart and Account by defining a specific layout page template on that page.
But this is not possible for the other woocommerce pages. I only want to remove the sidebar on the single product page, and not on the shop page.
How can I do that ?
(working with the woocommerce.php and wocommerce-nosidebar.php files will affect both the shop page AND the single product page, which is not what I want…)
Thank you !
June 21st, 2019 at 10:39 #78709any ideas ? 🙂
June 27th, 2019 at 14:08 #83480ZedCryout Creations mastermindIf WooCommerce extends the base template hierarchy, you should be able to create a dedicated template file for a single product with which to control the layout.
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.June 29th, 2019 at 10:38 #83557What you are saying is that the layout of the single product pages depends on WooCommerce and not the theme ?
And that there is no way I can change this layout for now ?
June 29th, 2019 at 11:07 #83562ZedCryout Creations mastermindI mean that WordPress is capable of reading the code from specific files depending on what is browsed to render the content with. If WooCommerce extends this functionality it should also be able to read a specific file bearing a particular name (when it exists) to target a specific WooCommerce section.
I see some information about the procedure and filename here:
https://wordpress.stackexchange.com/questions/190335/woocommerce-change-template-for-single-product-pageYou’d need to merge code from both WooCommerce’s template and the theme’s files to ensure the correct markup as needed by the theme is present.
Otherwise, the theme will use instruct WordPress to render all WooCommerce site sections using the general layout (except individual static pages which can have their own custom layouts).
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.July 1st, 2019 at 13:52 #83628Than you for your answer
-
AuthorPosts
The topic ‘Woocommerce – remove sidebar from single product page only’ is closed to new replies.