The number next to a category in the GD > Categories block or widget is the number of published listings in that category, plus the listings in all of its subcategories.
So if a parent category called Churches has 6 listings assigned to it directly, and its subcategories hold another 40, the widget shows 46 next to Churches. A listing that is ticked in both the parent and a subcategory is counted once for each, so it can add to the parent total twice.
The category page itself works differently. Visiting the Churches archive shows every listing in Churches and in its subcategories, and each listing appears only once on that page.
Why a parent category shows fewer listings than expected
This usually happens after a CSV import where listings were given only a subcategory. They show on the subcategory page and are counted in the parent total, but they are not in the parent category itself. If you want them in both, add the parent to the listing’s categories. When you import, list both category names or IDs in the post_category column. Can I Place a Listing in Multiple Categories? covers how multiple categories work.
Other things that change the number
- Only published listings are counted. Pending, draft and expired listings are not.
- With Location Manager, the count is for the location the visitor is currently viewing, so the same category can show a different number on each city page.
- Page caching can show an old number until the cache is cleared.
Count only the listings in the category itself
To stop subcategory listings being added to the parent’s number, add this snippet:
add_filter( 'geodir_categories_include_child_terms_posts_count', '__return_false' );
To hide the numbers completely, tick Hide count in the block settings, or use [gd_categories hide_count='1']. All the other options are in GD > Categories.