- This topic has 5 replies, 2 voices, and was last updated 8 years, 6 months ago by Tom.
-
AuthorPosts
-
September 17, 2015 at 9:09 am #137478Fabian Cosmann
Hi Tom,
I try to design the shop page of woocommerce. Unfortunatly, sections are not working. Is there a way to add sections to woocommerce pages?
I then tried another way. I’m using a GP child theme with files from Exhibit.
I copied the archive-product.php to my child theme and modified it. It did not work.
I then copied the woocommerce.php from GP to my child theme and modified this file and it worked – but all changes are now on all woocommerce pages.
I found out, that woocommerce.php has priority before archive-product.php.
So my question is, can I delete woocommerce.php? Or how can I modify just the shop page?Thank you
FabianSeptember 17, 2015 at 10:28 am #137524TomLead DeveloperLead DeveloperHi there,
You can enable the Sections add-on on WooCommerce products like this: https://generatepress.com/forums/topic/sections-in-woocommerce-product-page/#post-131479
Let me know if you need more info ๐
September 17, 2015 at 1:26 pm #137575Fabian CosmannHi Tom,
thank you for your quick answer.
I added it to my GP-Child functions.phpI’ve seen, that this hook only enables sections for the single product pages but not for the shop page.
Unfortunately, after enabling sections on a single product page, all formatting was lost, too large product image and side bar moved at the end of the page… and no section was visible… ๐September 17, 2015 at 11:15 pm #137630TomLead DeveloperLead DeveloperAh, it definitely won’t work for the shop page – there would be no way for the products and the sections to work together.
You could alternatively create a regular page, and then use the WooCommerce shortcodes to show products within each section?
September 18, 2015 at 2:15 am #137688Fabian CosmannThanks for your reply.
To sad, that the shop page could not be go together with sections.But I copied the woocommerce.php from the GP folder to my child them folder. I now can change the layout in the way that I put a banner after the header() call.
But now, this modification is also on every single page.
I would like to copy the product-archive.php to modify the shop page. But in order to get this working, I have to delete the woocommerce.php.
Is there a reason for GP to use the woocommerce.php?Whats going wrong with the single pages if used the hook and the sections?
September 18, 2015 at 9:58 am #137797TomLead DeveloperLead DeveloperThe woocommerce.php file basically allows the sidebar on the WooCommerce pages to display properly in GP.
The way WooCommerce sets up their plugin to work with other themes is.. interesting. So it requires themes like GP to add this custom file in order to display it properly (all themes have to do this).
However, adding a product-archive.php file (if that’s the correct name of the file they specify) should work perfectly for archives.
Make sure you’re adding the file using the correct structure in the child theme – they have more on that here: http://docs.woothemes.com/document/template-structure/
-
AuthorPosts
- You must be logged in to reply to this topic.