Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #16495

    Hi, I am a bit new to wordpress but love the Abundance theme and has been easy so far sorting it all out but one major problem.

    I am inputing all the Product Categories but am noticing none of the images or Product Categories show up in my main shop page. For example I input the name, slug, decription and assign an image for that category. But the only time I see it is when I actually place a related product to the category and then it shows up in my main shop page with the Category and a (1) for example.

    How can I show the Product Category on my shop page without having to place any products in it?

    #91706

    Hi,

    That is how woocommerce query categories. I guess you can change that on plugins > woocommerce > woocommerce-template.php and find this code

    $args = array(
    'child_of' => $product_category_parent,
    'menu_order' => 'ASC',
    'hide_empty' => 1,

    Change the value of hide_empty to 0 (zero).

    Regards,

    Ismael

    #91707

    Thanks but could not find that area, when I went to the editor it gave me a nume of selections.

    woocommerce/templates/taxonomy-product_cat.php

    woocommerce/templates/archive-product.php

    woocommerce/templates/content-single-product.php

    woocommerce/templates/single-product-reviews.php

    woocommerce/templates/taxonomy-product_tag.php

    woocommerce/templates/single-product.php

    woocommerce/templates/content-product_cat.php

    woocommerce/templates/content-product.php

    woocommerce/templates/loop-shop.php

    But no (woocommerce-template.php)

    Any suggestions on which one I can do the search in?

    #91708

    Found it, lol…wow but thanks that worked perfect, but it does not show the Product Category in the menu, widget area to the left, where do I find that to adjust?

    #91709

    Hi!

    Which woocommerce widget are you using in the sidebar?

    Regards,

    Peter

    #91710

    I am using the woocommerce widget called, ( WooCommerce Product Categories )

    #91711

    Hey!

    Try following – open up woocommercewidgetswidget-product_categories.php and replace:

    $cat_args['current_category_ancestors']	= $this->cat_ancestors;

    with:

    $cat_args['current_category_ancestors']	= $this->cat_ancestors;
    $cat_args['hide_empty'] = 1;

    An altternative (maybe better solution) would be a filter function – you can add it to the bottom of functions.php:

    add_filter('woocommerce_product_categories_widget_args', 'inoplugs_widgetcat_exclude_filter');
    function inoplugs_widgetcat_exclude_filter( $cat_args ) {
    $cat_args['hide_empty'] = 1; return $cat_args;
    }

    Regards,

    Peter

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Product Categories Listing’ is closed to new replies.