Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are trying to allocate products in categories, but they disappeared in the wp-admin categories screen. Although the search results counter shows a number greater than zero, no categories appear in the list.

Solution:
The problem was caused by a custom function in the theme files. Removing that function fixed it!

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 1 replies, has 0 voices.

Last updated by valeriod-11 1 week, 1 day ago.

Assisted by: Shekhar Bhandari.

Author Posts
July 18, 2025 at 4:46 am

valeriod-11

Background of the issue:
I am trying to allocate products in categories, but they disappeared. In the categories screen, when I make a search, the results counter is bigger than 0, but no categories show up in the list in wp-admin.

Symptoms:
The categories do not appear in the list, but the counter indicates there are results.

Questions:
Why are the product categories not showing up in the list?
Why does the counter show results but no categories are visible?

July 18, 2025 at 6:39 am
July 18, 2025 at 6:55 am #17248745

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Please go to your child theme functions.php and remove the following code: hidden link

add_filter('get_terms', 'esconder_categorias_vazias_woof', 10, 3);
function esconder_categorias_vazias_woof($terms, $taxonomies, $args) {
    if (in_array('product_cat', $taxonomies)) {
        $terms = array_filter($terms, function($term) {
            return $term->count > 0;
        });
    }
    return $terms;
}

This will solve the issue.

Thanks

July 18, 2025 at 1:56 pm #17250645

valeriod-11

It did the trick. Thanks for your help!!