WordPress Categories Not linked through posts
-
Hi I recently have been trying to migrate my wordpress.com blog to a www.ads-software.com version 2.7 version. The import of items appeared to go good, All posts exist, some sub categories got duplicated in the import but all the categories are there. Although the categories don’t seem to have the correct numbers of posts in them, all but 5 categories (out of 50 or so) have 0 posts. When I go to my posts they show that they are in all the correct categories.
Also when I add a category widget it will only list the categories that it thinks it has posts in. Can someone explain to me when you add the categories widget how it queries the database? Or how it determines what posts are linked to what categories?
Everything I check in the database appears to be correct.
– An ID in wp_posts correlates to an object_id in wp_term_relationships
– In which there will be a few rows (depending on how many categories that post is linked to)
– Then you can look up term_taxonomy_id in wp_term_relationships which is also listed in the wp_terms table in which you can link it to a term_id.
– Then the term_id row has a name column which is the names of my CategoriesMaybe this isn’t the way it tries to pull the category links but possibly someone can give me some more understand to what might be happening and how I can fix it.
Also the “post_category” int(4) column in the wp_posts table has a 0 value across the board… What is this column for, possibly this is where my problem lies?
When I do the command <?php wp_list_categories(‘show_option_all&hide_empty=0’); ?> It will list all my categories on the page, so obviously it is thinking almost all of them are empty. But when I click on the category link it will bring up a post in that category. I guess there must be a SQL command that I can run to update my database regarding my categories…
Thanks,
- The topic ‘WordPress Categories Not linked through posts’ is closed to new replies.