[resolved] category_children - how to recalculate? (4 posts)

  1. DrLightman
    Posted 6 years ago #

    Hi, is there a way to let WP recalculate category_children option?

  2. esmi
    Forum Moderator
    Posted 6 years ago #

    Pardon? Can you elaborate?

  3. DrLightman
    Posted 6 years ago #

    Last time I imported wp_terms_* tables from another installation into a fresh installation.

    All went fine, tags were imported, categories also were imported and appeared correctly in the admin Post page. But in the Categories management page only parent categories were showed. I discovered an option named "category_children" into wp_options that is used by that page to display child categories, so I had to copy that option also from the old database.

    I wonder if it could be recalculated automatically since the wp_terms_* strcture should be enough to build the categories tree.

  4. DrLightman
    Posted 5 years ago #

    I had this problem again in WP 3.0.1 after importing several XMLs from another blog into my blog using the official WordPress Importer 0.2 plugin, merging tags and categories. The effective number of pages of categories did not reflect the real number of categories present in the database, because even if the total pages were 9 after the 6th they were empty.

    To fix this I had to delete the option named "category_children", so that it was autoamtically recalculated by WP again when I went back to the Categories menĂ¹ in the dashboard.

    I'll leave it here as a memo for me or for anyone who could find it useful.

Topic Closed

This topic has been closed to new replies.

About this Topic