Support Forum
<?php
add_action('init', 'ffu_tax_attributes');
function ffu_tax_attributes()
{
$labels = [
'name' => esc_html__('Attributes', 'ffu'),
'singular_name' => esc_html__('Attribute', 'ffu'),
'menu_name' => esc_html__('Attributes', 'ffu'),
'search_items' => esc_html__('Search Attributes', 'ffu'),
'popular_items' => esc_html__('Popular Attributes', 'ffu'),
'all_items' => esc_html__('All Attributes', 'ffu'),
'parent_item' => esc_html__('Parent Attribute', 'ffu'),
'parent_item_colon' => esc_html__('Parent Attribute', 'ffu'),
'edit_item' => esc_html__('Edit Attribute', 'ffu'),
'view_item' => esc_html__('View Attribute', 'ffu'),
'update_item' => esc_html__('Update Attribute', 'ffu'),
'add_new_item' => esc_html__('Add new attribute', 'ffu'),
'new_item_name' => esc_html__('New attribute name', 'ffu'),
'separate_items_with_commas' => esc_html__('Separate attributes with commas', 'ffu'),
'add_or_remove_items' => esc_html__('Add or remove attributes', 'ffu'),
'choose_from_most_used' => esc_html__('Choose most used attributes', 'ffu'),
'not_found' => esc_html__('No attributes found', 'ffu'),
'no_terms' => esc_html__('No Attributes', 'ffu'),
'filter_by_item' => esc_html__('Filter by attribute', 'ffu'),
'items_list_navigation' => esc_html__('Attributes list pagination', 'ffu'),
'items_list' => esc_html__('Attributes list', 'ffu'),
'most_used' => esc_html__('Most Used', 'ffu'),
'back_to_items' => esc_html__('Back to attributes', 'ffu'),
'text_domain' => esc_html__('ffu', 'ffu'),
];
$args = [
'label' => esc_html__('Attributes', 'ffu'),
'labels' => $labels,
'description' => '',
'public' => true,
'publicly_queryable' => true,
'hierarchical' => false,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_rest' => true,
'show_tagcloud' => true,
'show_in_quick_edit' => true,
'show_admin_column' => true,
'admin_columns' => [
'sort' => true,
'searchable' => true,
'filterable' => true,
],
'query_var' => true,
'sort' => false,
'meta_box_cb' => 'post_tags_meta_box',
'rest_base' => '',
'rewrite' => [
'with_front' => false,
'hierarchical' => false,
],
];
register_taxonomy('attribute', ['movie'], $args);
}
I did add custom taxonomies like the one above, and would like to make it searchable in the admin columns, but
'admin_columns' => [
'sort' => true,
'searchable' => true,
'filterable' => true,
],
does not work.
Is it possible to search for (custom) Taxonomies in the backend?