Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   eCommerce & Atahualpa (http://forum.bytesforall.com/forumdisplay.php?f=31)
-   -   [SOLVED] Atahualpa & Woocommerce Footer/Sidebar (http://forum.bytesforall.com/showthread.php?t=19631)

emillian Feb 14, 2013 05:37 AM

[SOLVED] Atahualpa & Woocommerce Footer/Sidebar
 
Hi there,

I've installed the woocommerce plug in and having some issues with the sidebar and footer on the products page (called webshop on my site). The footer is all "wrapped" on the left side and no sidebar is displayed att all.


I've read thru a number of posts on this already and followed a few solutions. I've added the following to the functions.php. It solved some issues however I guess I missed some DIV's in this.

Appreciate any suggestions to get the sidebar and footer displayed correctly (all other pages it's shown correctly. (my site: www.demilliano.net)

PHP Code:

add_action('wp'create_function("""if (is_archive(array('product'))) remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);") );
//Unhook (remove) the WooCommerce sidebar on individual product pages

add_action('wp'create_function("""if (is_singular(array('product'))) remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);") );
//Unhook (remove) the WooCommerce sidebar on all pages

remove_action'woocommerce_sidebar''woocommerce_get_sidebar'10);

function 
bfa_open_woocommerce_content_wrappers()
{
    echo 
'<div class="wrapper">';
}

function 
bfa_close_woocommerce_content_wrappers()
{
    echo 
'</div>';
}

function 
bfa_prepare_woocommerce_wrappers()
{
    
remove_action'woocommerce_before_main_content''woocommerce_output_content_wrapper'10 );
    
remove_action'woocommerce_after_main_content''woocommerce_output_content_wrapper_end'10);

    
add_action'woocommerce_before_main_content''bfa_open_woocommerce_content_wrappers'10 );
    
add_action'woocommerce_after_main_content''bfa_close_woocommerce_content_wrappers'10 );
}
add_action'wp_head''bfa_prepare_woocommerce_wrappers' ); 


juggledad Feb 14, 2013 05:55 AM

did you try the suggestions in this thread?

emillian Feb 14, 2013 06:11 AM

Yes I had a look and I've added the following to the functions.php. I hoped it would solve the woocommerce issue and get the sidebar back and footer back in it's place but it didn't.

PHP Code:

add_action('wp'create_function("""if (is_archive(array('product'))) remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);") );
//Unhook (remove) the WooCommerce sidebar on individual product pages

add_action('wp'create_function("""if (is_singular(array('product'))) remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);") );
//Unhook (remove) the WooCommerce sidebar on all pages

remove_action'woocommerce_sidebar''woocommerce_get_sidebar'10);
?> 

Just realised I probably should have edited the footer.php as well and replace
PHP Code:

if (!isset($bfa_ata)) 

with
PHP Code:

if ((!isset($bfa_ata)) or (class_exists('Woocommerce')) ) 

as you suggested in the post in the first place.

Just did it and it indeed did the trick for both the footer and the sidebar, they are back where they belong !


All times are GMT -6. The time now is 04:22 AM.

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