• Hi, I have created a Product categories filer. I want to show the empty categories too. How can I achieve this.

    Thanks and waiting for your response.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter assad1999

    (@assad1999)

    I am still waiting for the response. I saw some other tickets getting replies but why nobody didn’t respond to me yet?

    Plugin Author Dmytro Holovnia

    (@dholovnia)

    Hi,

    To show categories with filtered our or hidden products you can turn off option ‘Hide values without products’ on the plugin settings page.

    To show categories that don’t have any products at all you need to add this PHP code to your child-theme functions.php file

    add_filter('berocket_aapf_get_terms_class_args', 'berocket_aapf_get_terms_class_args_hide_empty_disable');
    function berocket_aapf_get_terms_class_args_hide_empty_disable($args) {
    $uncategorized = get_option( 'default_product_cat' );
    $args['exclude'] = $uncategorized;
    $args['hide_empty'] = false;
    return $args;
    }

    Also, on the plugin settings page tab General set ‘Values count and output’ to the first value in the list ‘All non-empty values are displayed; standard recounting is applied’.

    Regards,
    Dmytro

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Want to show empty categories too’ is closed to new replies.