Maintenance deletes parent categories with 0 posts

I heard from a client that some parent categories with 0 posts were removed, which made those subcategories become new “parent” categories … which shouldn’t happen when this is run. Can you check if the code that runs this is adapted for this, please?

And not a bug, but it would be nice if the extension would remember what I have enabled/disabled so when coming back to the extension, I can run the same settings again without having to do the same thing over and over again.

1 Like

Hey @jeroenrotty

This is intended behavior. If the main category doesn’t have any associated posts, it will get deleted regardless of whether it has subcategories with associated posts.

When a category is deleted, the default behavior in WordPress is to then convert the subcategories into parent categories.

So that is what happens when our extension deletes categories as well.

In a future version of the extension, we will look into adding a choice whether or not to delete the parent category if its subcategories have associated posts.

Please feel free to make a suggestion about this on our feedback site. That way, others can vote for it, letting us know which features our users want the most. https://feedback.mainwp.com

Hmm, intended behavior but that should be a big warning then. A lot, if not all people do categorize their posts into 1 or multiple categories, but not in their parent and subcategories - at least that’s how I see it.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.