Title: Custom posts   custom taxonomy
Last modified: August 20, 2016

---

# Custom posts custom taxonomy

 *  [xrundel1](https://wordpress.org/support/users/xrundel1/)
 * (@xrundel1)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/custom-posts-custom-taxonomy/)
 * I’m looking for little help. I have code to create custom-posts but I need to
   add custom taxonomy to it. I need both type of taxonomy categories and tags and
   categories need to be hierarchical.
 * Here is the code I use in function.php
 * // custom-post
    // $labels = array( ‘name’ => __(‘Custom-Post’), ‘singular_name’
   => __(‘Custom-Post’), ‘add_new’ => __(‘Add New Custom-Post’), ‘add_new_item’ 
   => __(‘Add New Custom-Post’), ‘edit_item’ => __(‘Edit Custom-Post’), ‘new_item’
   => __(‘New Custom-Post’), ‘view_item’ => __(‘View Custom-Posts’), ‘search_items’
   => __(‘Search Custom-Posts’), ‘not_found’ => __(‘No Custom-Posts found’), ‘not_found_in_trash’
   => __(‘No Custom-Posts found in Trash’), ‘parent_item_colon’ => ” ); $args = 
   array( ‘labels’ => $labels, ‘singular_label’ => __(‘Custom-Post’), ‘public’ =
   > true, ‘show_ui’ => true, ‘capability_type’ => ‘post’, ‘hierarchical’ => false,‘
   rewrite’ => true, ‘has_archive’ => true, ‘supports’ => array(‘title’, ‘editor’,‘
   author’, ‘excerpt’, ‘custom-fields’, ‘comments’), // ‘taxonomies’ => array(‘category’));
   register_post_type(‘Custom-Post’, $args);
 * //
 * I’ll appreciate if someone could give me another part which can create custom
   taxonomies.
    I know about plugins for custom-posts and custom taxonomies, but
   in my case I can’t use plugins, I need it in functions.php
 * Thank you in advance.

The topic ‘Custom posts custom taxonomy’ is closed to new replies.

## Tags

 * [custom post](https://wordpress.org/support/topic-tag/custom-post/)
 * [custom taxonomy](https://wordpress.org/support/topic-tag/custom-taxonomy/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [xrundel1](https://wordpress.org/support/users/xrundel1/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/custom-posts-custom-taxonomy/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
