Remove custom taxonomy from database (3 posts)

  1. jef3000
    Posted 3 years ago #

    I have some custom taxonomy created, but would now like to completely (also from the database) remove the taxonomy. Does anyone know a proper way to handle this or knows a query to clean the database?

    Example code:

    		array('post', 'con_game_reviews', 'con_game_previews', 'games'),
    			'hierarchical' => false,
    			'label' => 'games - Xbox 360',
    			'query_var' => true,
    			'rewrite' => array('slug' => 'xbox360')
  2. Mike Stumpf
    Posted 3 years ago #

    I have the same problem. This is the closest that I have found to doing what you are talking about but I am not sure it is actually incorporated in the WP core yet.



  3. Andrew Tegenkamp
    Posted 2 years ago #

    I deleted all the taxonomy entries and that seems to clean up the wp_term_taxonomy and wp_terms database tables. That action should remove the references in the database and reset any posts or pages (or custom post types) to not have those associations anymore.

    I believe you can do it in code with wp_delete_term (http://codex.wordpress.org/Function_Reference/wp_delete_term) as well. I think that is the best you can cleanup a taxonomy at this time.

Topic Closed

This topic has been closed to new replies.

About this Topic