Have you tried with SQL? This one worked for me.
UPDATE wp_term_taxonomy SET count = (
SELECT COUNT(*) FROM wp_term_relationships rel
LEFT JOIN wp_posts po ON (po.ID = rel.object_id)
WHERE
rel.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
AND
wp_term_taxonomy.taxonomy NOT IN ('link_category')
AND
po.post_status IN ('publish', 'future')
)
Related Posts:
- How to change permalink structure for custom post type and it’s taxonomies?
- Get the first post term
- Creating “static” taxonomies to choose from, inside custom post type?
- How can I list all the categories under a Custom Post Type (taxonomy)?
- How to list all categories and tags in a page?
- How to sort list of custom posts to get view like a tree of posts under categories and their children’s categories?
- How can you make permalink work for custom post type and taxonomy?
- How to get a list of term names of the custom post type im currently on in single.php
- List all custom post type posts from a given category?
- Custom post type taxonomy template
- get_categories for custom post type and filter by custom taxonomy (brand) and list child categories of a defined category
- Category page only displaying the posts from a custom type
- Show Post Count of a Category
- Custom Post Types and Categories?
- How to create new category for custom post type?
- Get Post Primary Category
- Pagination is not working on single-{slug}.php but works fine on page-{slug}.php
- How to get the post type from a category id?
- How to show CPTs in term archive
- Display all posts in main category and 1 subcategory
- Show category ID on custom post type
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- Limit amount of posts made within a custom taxonomy
- Hierarchy and access control for Custom Post Types (CPT)
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Categories and tags for custom post types
- get_category_link() for custom post type does not include custom slug rewrite?
- Targeting categories in custom fields
- Invalid Taxonomy
- Need help deciding on a taxonomy
- Get Posts by Category, Tag , and CPT Taxonomy
- Get assigned post categories
- Default Category Page not showing custom post type which has taxonomy category
- Categories won’t appear on custom post type
- Custom Post Type with modified permalink structure results in 404
- Custom post type, taxonomy and admin bar
- Displaying taxonomies as category links within sidebar and creating pages for these
- Custom post type archive page filters
- How to show related posts of category on post within custom posttype
- get taxonomies from terms
- Create custom post type categories
- Set a Default CPT taxonomy by taxonomy id
- how to create custom taxonomy drop downs for parents and child
- How to manage a dynamic multi-level page hierearchy system?
- Categories manage
- I can not call the categories of custom post type
- Reuse the “category” slug for a custom post type
- How to create groups like that in buddypress?
- Best way to structure article and issue relationship for CPT
- Custom Post Type used for FAQs Accordion
- category_name not working in WP_Query
- How can I set up the URL for a category archive for a custom post type?
- Custom Post Type order Title ASC
- show only one category posts in admin
- Is it possible for post and custom post type to share a category base slug?
- get attachments for all posts of particular post type
- How to limit the number of terms (terms acts like categories)
- Custom Post Type – Taxonomy Dropdown Menu?
- Filtering Posts by Multiple Taxonomy Terms such as in an Admin Post Listing?
- category__in not working on custom post type
- Group list of posts by taxonomy and allow for pagination
- Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url
- How can I add single catogory for custom post type?
- automatically save custom post type title as a category
- How do I display custom post types through a common taxonomy?
- Possible for Category Base and Custom post Type to share the same slug/permalink?
- Weird problem happening with custom taxonmy when creating/updating posts
- Conditional regex in add_rewrite_rule() for specific query filters & pagination
- Query Multiple Taxominies Across Multiple Post type’s
- CPT Archive with core Category
- get_posts() with custom post type does not work outside page.php
- Multiple level category drop-down from the WordPress dashboard
- How to get categories linked in posts for a specific post type
- Get the category from custom post type
- How to create a gallery page with categories?
- Cross reference custom post types
- Make a custom_post translatable
- Linking from CPT page to taxonomy.php
- Page not found for custom post type UI plugin and taxonomy
- Disable custom taxonomy on admin bar
- Want a custom query with just one category but from all custom post types
- How to constrain the results to a specific post_type on tag archive page?
- Problems making shortcode with custom post types and taxonomy
- Custom Post taxonomy template
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- Display related CPT with custom taxonomy
- Do not load the categories in Category.php
- If custom taxonomy exist on post?
- How to sort custom post’s category by id from the theme’s function.php?
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- how to show perticular category posts in custome page
- Problem with menu categories doubling up when updating database?
- Remove slug from Custom Category Permalink + dual-category permalinks
- Display associated taxonomy child name on single CPT page
- How to query posts by category with the_title();
- Custom Post Types Permalink