I added below code in wordpress to add new taxonomy in post. But I don't know how to show new taxonomy on post grid widget. I founded {{putPostTags(item.post_list.id)}} but I don't know how to change to use it.
function custom_taxonomy() { /* $label contains parameters determining the Taxonomy’s display name */ $labels = array( 'name' => 'Expert', 'singular' => 'Expert', 'menu_name' => 'Expert' ); /* $args declares various parameters in the custom taxonomy */ $args = array( 'labels' => $labels, 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, 'rewrite' => array( 'slug' => 'expert' ), ); /* register_taxonomy() to register taxonomy */ register_taxonomy('expert', 'post', $args); } // Hook into the 'init' action add_action( 'init', 'custom_taxonomy', 0 );
I added below code in wordpress to add new taxonomy in post. But I don't know how to show new taxonomy on post grid widget. I founded {{putPostTags(item.post_list.id)}} but I don't know how to change to use it.
function custom_taxonomy() {
/* $label contains parameters determining the Taxonomy’s display name
*/
$labels = array(
'name' => 'Expert',
'singular' => 'Expert',
'menu_name' => 'Expert'
);
/* $args declares various parameters in the custom taxonomy
*/
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'rewrite' => array( 'slug' => 'expert' ),
);
/* register_taxonomy() to register taxonomy
*/
register_taxonomy('expert', 'post', $args);
}
// Hook into the 'init' action
add_action( 'init', 'custom_taxonomy', 0 );
I used {{putPostTags(item.post_list.id)}} but this function show only default tags but how show my new taxonomy whitch has name Expert?
Thanks for help, Your suggested give me solution which works.