I am trying to figure out the best way to use the simple sidebar plugin to have a different set of sidebars on a single-product page and an archive product page in WooCommerce.
I thought I’ve done something like it on a previous project, but cannot find the code snippet for the life of me.
The snippets for the product is on the WooCommence site under their documentation.
Thanks. I looked over there and hadn’t seen anything related to the Genesis Simple Sidebar, only the Woo Sidebars…
If you have created the new sidebars, you just need to open up each of the Woocommerce related pages and turn on that sidebar.
Right. That works for the pages that WooCommerce installs, but I guess I haven’t been clear with what I am trying to do. Sorry ’bout that
I’ve copied single-product.php from the WooCommerce Connect plugin to my child theme, and have made some changes to the single product page there. I was also trying to add a Sidebar that I created using Simple Sidebars to that page on the template level.
I’ve done it before, but cant find the snippet of code that I used to do it, and was wondering if anyone here had any tips that would jog my memory.
If you created a custom page then you need to register a new sidebar and target only that sidebar in your new page. You cannot use the code from Simple Sidebars for that.
@anitac – That’s not correct. You are right that the code is not from Simple Sidebars, but it’s pretty easy to do what @sunyata wants, which, if I understand correctly, is to put the same sidebar created with Simple Sidebars in a page template. In other words, every page that loads this template will use that sidebar, and this saves the work of specifying the sidebar in each product.
@sunyata – Here’s a tutorial that should get you pointed in the right direction. You’ll need to get the ID of the sidebar you created with Simple Sidebars. Then you’ll skip down to step #3, since you’ve covered the first 2 steps with a different approach. You can use that code to put the sidebar you created with Simple Sidebars in your page template.
Hope that helps.
Haha! Thanks Billy Murray! This looks like exactly what I was looking for.
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.