Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   [SOLVED] Add sidebar to new pages created by Woo Commerce? (http://forum.bytesforall.com/showthread.php?t=20899)

moomum Sep 11, 2013 09:20 AM

[SOLVED] Add sidebar to new pages created by Woo Commerce?
 
Hiya
I'm working on www.mamablessings.co.uk
I have a right sidebar set up with widgets to show shopping cart and product categories but it isn't showing up on the pages that Woo Commerce added, so I can't see it on any of the product pages, or the cart or any of that.

Is there a way to tell the sidebar to appear on all the new pages as well?

Love love love this theme, the more I use it the more I love it!

juggledad Sep 11, 2013 11:33 AM

Search the forum.

moomum Sep 12, 2013 12:36 AM

:-) I did try that before I posted, I'll try again/

moomum Sep 12, 2013 12:58 AM

Really I can't find anything that helps here.
There is a theme integration guide at Woo Commerce http://docs.woothemes.com/document/t...compatibility/
and it says to copy the page.php (in another thread you say to copy index.php instead of page http://forum.bytesforall.com/showthr...light=page.php)

I can do that, but then the instructions say to find the loop, and I don't know what I am doing.
I can find 2 incidents of <?php if

the first at line 28

<div <?php if ( is_page() ) { post_class('post'); } else { post_class(); } ?> id="post-<?php the_ID(); ?>">
<?php } else { ?>

and the second at line 51

<?php if ($bfa_ata['widget_center_bottom'] <> '') {
echo bfa_parse_widget_areas($bfa_ata['widget_center_bottom']);
} ?>

but neither of those look like <?php if ( have_posts() ) :

This is what Woo tell me to do:
Using woocommerce_content()

This solution allows you to create a new template page within your theme which will be used for all WooCommerce taxonomy and post type displays. While an easy catch-all solution, it does have a draw back in that this template will be used for all WC taxonomies (product categories etc) and post types (product archives, single product pages). Developers are encouraged to use the hooks instead.
To set up this template page perform the following steps:
Duplicate page.php

Duplicate your theme’s page.php file, and name it woocommerce.php. This file should be found like this: wp-content/themes/YOURTHEME/woocommerce.php.
Edit your page (woocommerce.php)

Open up your newly created woocommerce.php in a text editor (or the editor of your choice).
Replace the loop

Next you need to find the loop (see The_Loop). The loop usually starts with a:

<?php if ( have_posts() ) :

and usually ends with:

<?php endif; ?>

This varies between themes. Once you have found it, delete it. In its place put:

<?php woocommerce_content(); ?>

This will make it use WooCommerce’s loop instead. Save the file. You’re done.

juggledad Sep 12, 2013 01:08 AM

Did you try the suggestions in http://forum.bytesforall.com/showthread.php?t=18647

moomum Sep 12, 2013 01:18 AM

Whooop! Brilliant, thank you, I wouldn't have thought to look at that thread because it seemed to be a about a different problem than mine.
You are a total superstar, have a fantastic day!


All times are GMT -6. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.