Title: Edit category table
Last modified: August 20, 2016

---

# Edit category table

 *  Resolved [calidriswl](https://wordpress.org/support/users/calidriswl/)
 * (@calidriswl)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/edit-category-table/)
 * Hi,
 * I’m editing a site ([http://www.mix-it.be](http://www.mix-it.be/individuals/category/fresh-soups/))
   of a company which sells soups and salads and stuff.
 * I am editing the view of the products, which you get if you follow the link.
   
   At the moment every product belongs to a category like fresh soups or milkshakes.
   At the moment the quantities in which a product is sold is linked to the product
   itself. I want to change this. I have added an extra column to the wp_term_taxonomy
   table and now I need this table to be shown as a textfield in my admin panel 
   and in the edit panel of the categories and I need to be able to get to it in
   my code like `$current_category->quantities`
 * Can anybody help me with this?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [calidriswl](https://wordpress.org/support/users/calidriswl/)
 * (@calidriswl)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/edit-category-table/#post-2670235)
 * I managed to solve part of my problem.
 * I got my extra column into the wp_term_taxonomy table:
    `add_action` on `manage_category_custom_column`
   And I can fill that column with the correct data from the database:
 *     ```
       $categories = get_terms( 'category', 'orderby=name&hide_empty=0' );
       foreach($categories as $category)
       	{
       		if ($column_name == 'quantities' && $term_id == $category->term_id)
       		{
       			echo $category->quantities;
       		}
       	}
       ```
   
 * I also managed to get a new form field on the new category and edit category 
   pages so the user can set the quantities.
 * The only thing I can’t do is fill the column in the database if a new category
   gets made or if an existing one gets edited with the quantities the user gives
   me.
 *  Thread Starter [calidriswl](https://wordpress.org/support/users/calidriswl/)
 * (@calidriswl)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/edit-category-table/#post-2670246)
 * Found it after a long search and a little help from a friend.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Edit category table’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 1 participant
 * Last reply from: [calidriswl](https://wordpress.org/support/users/calidriswl/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/edit-category-table/#post-2670246)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
