Title: Capability Taxonomy
Last modified: July 3, 2018

---

# Capability Taxonomy

 *  Resolved [gonzalesc](https://wordpress.org/support/users/gonzalesc/)
 * (@gonzalesc)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/capability-taxonomy/)
 * Hi.
    I have this code in my functions.php
 *     ```
       add_filter('cptui_pre_register_taxonomy','custom_cptui_tax', 10,3);
   
       function custom_cptui_tax($args, $tax_name, $taxonomy) {
   
       	if( $tax_name == 'tamano' ) {
         		$args['capabilities'] = array(
       									'manage_terms' => 'manage_tamano',
       									'edit_terms' => 'manage_tamano',
       									'delete_terms' => 'manage_tamano',
       									'assign_terms' => 'edit_posts'
       							   );
   
       		update_option('jjtest1', print_r($tax_name,true));
       		update_option('jjtest2', print_r($args,true));
       	}
   
         return $args;
       }
       ```
   
 * I verify that jjtest1 and jjtest2 have the correct value.
 * Then I installed “User Role Editor” plugin and “User Roles and Capabilities” 
   plugin but the manage_tamano doesn’t appear.
 * How do I can validate that it made correctly?

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

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [7 years, 11 months ago](https://wordpress.org/support/topic/capability-taxonomy/#post-10458483)
 * Not quite sure why the plugins isn’t recognizing, as as far as I can see, you’re
   inserting the arguments correctly.
 * Perhaps after the fact, fetch the taxonomy with [https://codex.wordpress.org/Function_Reference/get_taxonomies](https://codex.wordpress.org/Function_Reference/get_taxonomies)
   and check it’s registered arguments, including capabilities, and see if they 
   match up.
 *  Thread Starter [gonzalesc](https://wordpress.org/support/users/gonzalesc/)
 * (@gonzalesc)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/capability-taxonomy/#post-10459184)
 * Hi.
 * With this plugin I created 1 post type called “empresas” and 3 taxonomies called
   tamano, tipo and producto.
 * Then in my functions.php :
 *     ```
       $args = array( 'public' => true );
       $output = 'objects';
       $taxonomies=get_taxonomies($args,$output); 
       ```
   
 * But it only show “category”, “post_tag” and “post_format”, but it doesn’t show
   the taxonomies I created with this plugin.
 * Regards
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [7 years, 11 months ago](https://wordpress.org/support/topic/capability-taxonomy/#post-10459228)
 * If you’re not running those 3 lines of code inside a callback on init or later,
   chances are they’re not registered yet.
 *     ```
       function cptui_test_filtering() {
       	$args = array( 'public' => true );
       	$output = 'objects';
       	$taxonomies=get_taxonomies($args,$output); 
       }
       add_action('init','cptui_test_filtering', 11 );
       ```
   
 * Check with that.
 * We run the taxonomy registration on init, priority 9, so this should cover that
   detail
 *  Thread Starter [gonzalesc](https://wordpress.org/support/users/gonzalesc/)
 * (@gonzalesc)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/capability-taxonomy/#post-10459267)
 * Oh well.. it appears!
 *     ```
       [tamano] => WP_Taxonomy Object
       (
       	[name] => tamano
       	[label] => Tamaños
       	[labels] => stdClass Object
       		(
       			[name] => Tamaños
       			[singular_name] => Tamaño
       			[search_items] => Search Tamaños
       			[popular_items] => Popular Tamaños
       			[all_items] => Todos los Tamaños
       			[parent_item] => Tamaño Padre
       			[parent_item_colon] => Parent Tamaño:
       			[edit_item] => Editar Tamaño
       			[view_item] => Ver Tamaño
       			[update_item] => Actualizar Tamaño
       			[add_new_item] => Agregar Nuevo Tamaño
       			[new_item_name] => Nuevo Tamaño
       			[separate_items_with_commas] => Separate Tamaños with commas
       			[add_or_remove_items] => Add or remove Tamaños
       			[choose_from_most_used] => Choose from the most used Tamaños
       			[not_found] => No se encontraron categorías.
       			[no_terms] => No hay categorías
       			[items_list_navigation] => Navegación por la lista de categorías
       			[items_list] => Lista de categorías
       			[most_used] => Más utilizadas
       			[back_to_items] => &larr; Volver a categorías
       			[menu_name] => Tamaños
       			[name_admin_bar] => Tamaño
       			[archives] => Todos los Tamaños
       		)
   
       	[description] => Tamaño con respecto al número de empleados
       	[public] => 1
       	[publicly_queryable] => 1
       	[hierarchical] => 1
       	[show_ui] => 1
       	[show_in_menu] => 1
       	[show_in_nav_menus] => 1
       	[show_tagcloud] => 1
       	[show_in_quick_edit] => 
       	[show_admin_column] => 
       	[meta_box_cb] => post_categories_meta_box
       	[object_type] => Array
       		(
       			[0] => empresas
       		)
   
       	[cap] => stdClass Object
       		(
       			[manage_terms] => manage_tamano
       			[edit_terms] => manage_tamano
       			[delete_terms] => manage_tamano
       			[assign_terms] => edit_posts
       		)
   
       	[rewrite] => Array
       		(
       			[with_front] => 1
       			[hierarchical] => 
       			[ep_mask] => 0
       			[slug] => tamano
       		)
   
       	[query_var] => tamano
       	[update_count_callback] => 
       	[show_in_rest] => 
       	[rest_base] => 
       	[rest_controller_class] => 
       	[_builtin] => 
       )
       ```
   
 * Capabilities “manage_tamano” appears but some roles plugin is not showing it.
 * Well.. Thanks for the support.
 * Regards
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [7 years, 11 months ago](https://wordpress.org/support/topic/capability-taxonomy/#post-10459536)
 * Welcome

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

The topic ‘Capability Taxonomy’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/capability-taxonomy/#post-10459536)
 * Status: resolved