• Hi there,
    I deleted a few hundred posts. They all have a particular tag (“Delete” in this case).

    I then restore the posts from the Trash.

    But the post count for the tag “Delete” didn’t update. It remained at 0.

    Is there a way to force a recount of the tag instances?

    I’ve tried using wp-cli to do it, but even though it said it was successful, the count didn’t change.

    
    wp term recount post_tag
    Success: Updated post_tag term count.
    

    This is a Multisite installation, and it’s occurred on one of the sub-sites. I thought maybe the wp-cli command wasn’t impacting the sub-site. So I tried using the --url=<url> option, and it didn’t make any different.

    Also, it’s worth noting, that if I click on the 0 in Wp-admin > Posts > Tags, it does take me to a list of posts with that tag. I just can’t seem to get the count to update.

    Obviously, this issue shouldn’t have occurred in the first place. So it may be a bug, or I suppose it could be a problem unique to my site.

    Regards,

    Jonathan

    • This topic was modified 2 years, 3 months ago by inspired888.
    • This topic was modified 2 years, 3 months ago by inspired888.
Viewing 1 replies (of 1 total)
  • Thread Starter inspired888

    (@inspired888)

    I’ve since tried doing a recount (via wp-cli) with all plug-ins disabled.

    I’ve also reapplied the tag to all the posts in question. Even that didn’t update the count.

    And I’ve added a new tag to them, via the bulk edit tool in WP, and that new tag shows up in the Tags list, but it also has a count of 0.

    This has me completely perplexed.

    • This reply was modified 2 years, 3 months ago by inspired888.
Viewing 1 replies (of 1 total)
  • The topic ‘Tag count is wrong after restoring deleted posts’ is closed to new replies.