I had to modify a published post and for some unknown reason, it removed the categories the post was in. I tried reassigning them, but it does not work: WordPress does not save the categories, so the post ends in the default "unclassified" category.

I've checked and it happens also if I create a new post. So it's a quite strange issue. I deactivated my caching plugin, to no avail.

Any idea what provokes this bug?

4 Answers 4


IT turns out the Role Scoper plugin needed an update. That, and the server admin bumped a new PHP 5.3.3 update. I'm not sure which caused which exactly, but at least you know more now where to look at if the issue arises.

  • so you got it solved? Or are you still experiencing the problems?
    – hakre
    Aug 24, 2010 at 0:10

From what you describe you experience a problem that looks like a local problem on your site. Therefore the assumption is very likely that it is a configuration issue on your site and not a bug. Bug would mean this is a defect in the software. If it would be a bug, everybody using wordpress would run into this problem (or at least a great share).

Because this is not the case (for example I still can do what you describe as broken on my Blog), you need to find the problem within your blogs configuration. For example, please switch your site to the default theme and deactivate all plugins. Then test again, if you can or can not assign categories to posts.

If you still can not add categories to posts your site is very likely to be broken in configuration. Consider to contact professional wordpress support then to drill down this on your host because the reason of your problem can not be genreally found out w/o taking a look into your files and database(s).

If you can add categories after deactivating all plugins and themes, then it's highly likely that one of the Add-Ons is breaking stuff. You can now use try-and-error to find out which one of the Ad-Ons is causing this. It might be a single one (so to activate one and deactivating all others to find out) or a combination of many (so to activate group of plugins and then to test for functionality to find out).

Even these problems do occur often with third-party plugins, there is no tool or help build into wordpress that makes looking for a destructive plugin easier than doing a manual, one-by-one search.

Some trick at least is to just rename the plugin directory which temporarily prevents worpdress from loading all active plugins. Doing so makes looking for this being a plugin issue much faster than clicking through the plugin configuration in the admin.

  • thank you for this. I have tried disabling a few plugins that might be causing the problem but so far, no luck. I have heavily modified my .htaccess file. Could that be a cause?
    – pixeline
    Aug 23, 2010 at 12:22
  • @pixeline: certainly not.
    – hakre
    Aug 24, 2010 at 0:10

am unable to insert categories in wordpress

function category()

function custom_category($params)
    $result= $params->get_params();

//echo "hello";
$cate = array(
  'cat_name'    => $cat,
  'category_description'  => $category_description=$result['category_description'],
  'post_status'   => 'publish',
  'category_nicename' => 'category-slug' 

$cat_id= wp_insert_category($cate);
return $cat;
function create_custom_taxonomy() {

  $labels = array(
    'name' => 'cat_name',
    'singular_name' => 'singular111_cat_name',
    'search_items' =>  'abc',
    'all_items' => __( 'All Topics' ),
    'parent_item' => __( 'Parent Topic' ),
    'parent_item_colon' => __( 'Parent Topic:' ),
    'edit_item' => __( 'Edit Topic' ), 
    'update_item' => __( 'Update Topic' ),
    'add_new_item' => __( 'Add New Topic' ),
    'new_item_name' => __( 'New Topic Name' ),
    'menu_name' => __( 'Topics' ),

// Now register the taxonomy

  register_taxonomy('cat_name',array('post'), array(
    'hierarchical' => true,
    'labels' => $labels,
    'show_ui' => true,
    'show_admin_column' => true,
    'query_var' => true,
    'rewrite' => array( 'slug' => 'name' ),

add_action( 'init', 'create_custom_taxonomy', 0 );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.