• The website I’m developing is primarily static (using Dazzling theme by Colorlib) with only one products page (5 products) needed. All the other page are “Full-Width” (as selected on each page under Page Attributes/ Template).

    I’d like the woo commerce pages (shop, cart, etc) to be full-width also, but selecting “Page Full-Width” does not change the page to the full width layout – the side bar is still there.

    ALSO, this is presenting the a problem for the Feature Image I select for each page. Even after selecting (and clicking update) the Feature image doesn’t display on the woocommerce pages. I image though that this has to do with the fact the Feature Image code is in the page-fullwidth.php file which, as mentioned above, isn’t being called even after selecting it from the Page Attributes section.

    I tried editing woo-setup.php and uploading it to my child-theme folder (adding in the Feature Image code. But that didn’t work. not sure if the woo-setup.php file is getting called from the child-theme folder.

    Any insight would be most appreciated!

    https://ww.wp.xz.cn/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter andysb72

    (@andysb72)

    Just to add clarity.

    This is what the regular pages look like:
    http://dev.tdfinternational.net/index.php/our-team/

    This what the newly installed WooCommerce pages look like:
    http://dev.tdfinternational.net/index.php/shop/

    how do get ride of the sidebar and get my feature image code in there?

    Thanks again! 😉

    hi @andysb72,

    You can do this several ways and what you can do is to create a file called woocomemrce.php in your child theme. Then try to inspect your page template files for full width and the one with the sidebar to see how they are structured and see where they differ.

    Next, copy the contents of one the files into woocommerce.php and replace the loop with woocommerce_content(), See this for details … https://docs.woothemes.com/document/third-party-custom-theme-compatibility/

    Looking into the source code <div id="primary" class="content-area col-sm-12 col-md-8 pull-left ">, it seems like this was coded with Bootstrap framework. So that div has a class of col-md-8. You should replace that with col-md-12.

    This code is the sidebar <div id="secondary" class="widget-area col-sm-12 col-md-4" role="complementary"> so no need to add this to the woocommerce.php template.

    Hope that helps and makes sense.

    Thread Starter andysb72

    (@andysb72)

    Thanks @wooassist! The woocommerce_content() works.

    The only problem now is that JUST ON THE SHOP page, my feature image is blank (though viewing source shows that it is using that listed product image, named inventory.jpg). Only for that page, though. The cart and checkout pages look fine and are loading the proper feature image, named home_off.jpg. So I guess the product image on the shop page is using same/similar label?

    the code snippet I’m using to load my feature image as the background of a div is `<?php if (has_post_thumbnail( $post->ID ) ): ?>
    <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘single-post-thumbnail’ ); ?>
    <div id=”featureImg” style=”background-image: url(‘<?php echo $image[0]; ?>’)”>

    </div>
    <?php endif; ?>`

    Here’s the page with the problem
    http://dev.tdfinternational.net/index.php/shop/

    But these are looking good!
    http://dev.tdfinternational.net/index.php/cart/
    http://dev.tdfinternational.net/index.php/checkout/

    Oh, and I guess if you click the product title to go to the product page, same problem.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Changing Page Attributes/Template’ is closed to new replies.