WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] Excluding categories from main shop page (2 posts)

  1. rajaito
    Member
    Posted 1 year ago #

  2. rajaito
    Member
    Posted 1 year ago #

    I was not able to get the edits to work until I tried this:

    Override the woocommerce/templates/content-product_cat.php template by copying it to your-theme/woocommerce/content-product_cat.php and adding something like the following to the top:

    if ( is_shop() && in_array( $category->slug, array( 'donation' ) ) ) {
    return;
    }

    Obviously substituting in whichever subcategories you want excluded, and using the appropriate conditional tags to apply to the particular pages you want.

    http://www.foxrunsoftware.net/articles/wordpress/hide-certain-woocommerce-subcategories-catalog/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic