WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Dont Show the Sidebar on Product Category Page (2 posts)

  1. Tunbosun Ayinla
    Member
    Posted 1 year ago #

    PLease how do i hide the sidebar from showing on a product category page. I want the page to be full width without the sidebar.
    I tried using is_product_category() conditional statement in my page.php and archive.php file to no avail.

    Thanks.

    http://wordpress.org/extend/plugins/woocommerce/

  2. ameraz
    Member
    Posted 1 year ago #

    You need to remove the following lines of code from the archive-product.php

    <?php
    	/**
    	 * woocommerce_sidebar hook
    	 *
    	 * @hooked woocommerce_get_sidebar - 10
    	 */
    	do_action('woocommerce_sidebar');
    ?>

    or, hook the sidebar out by adding the following lines of code to your functions.php (best way to do it actually)

    remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic