I am quite desperate here trying to solve this. I am customizing a WordPress Tisson Pro Theme to be WooCommerce ready (it is not). I already did what is suggested related to “Third party / custom / non-WC theme compatibility”, doing it in my own Child-Theme, and 1 million things more… But the sidebar still looks not loading in the Shop Page! I inspected the code, and looks like the problem is the following;
woocommerce.php
<?php get_header();
$sidebar = mfn_sidebar_classes();
?>
<!-- Content -->
<div id="Content">
<div class="container">
<!-- .content -->
<?php
//open div
if( $sidebar ) echo '<div class="content">';
//get woocommerce content
woocommerce_content();
if( $sidebar ){
//close div
echo '</div>';
} else {
echo '<div class="clearfix"></div>';
}
?>
<!-- Sidebar -->
<?php
if( $sidebar ){
get_sidebar();
}
?>
</div>
</div>
<?php get_footer(); ?>
The code is not entering if( $sidebar ), somehow I cannot figure out why! I tried everything with no luck.
Please if you could help me I will really appreciate it 🙂
From the WooCommerce Third Party Theme Compatibility docs, you should be able to just define your wrappers… which looks like a
<div class="content">
as far as I can tell. If you use these wrappers infunctions.php
then you do not need awoocommerce.php
.Try this ..
>> MORE DETAILS HERE
Codes above will work only if the default hooks is not remove or re-positioned to different functions.
May I know your current shop URL ? In genesis, there’s a page settings which you can select a page layout. You should choose sidebar-content or content-sidebar. Then on widgets, your primary sidebar must have atleast one widgets so you will see the results. The problem on genesis and woocommerce structure is not the same. All you need to do is wrap the woocommerce HTML with the
<div class="content"><div class="entry-content">
. The structure should be like thisIf the alignment is still not correct, then the problem is on your CSS codes. Second option is override you woocommerce file to your current theme and no need for using hooks in functions.php. Hope this will help you.