Custom taxonomy
-
Using this code
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser. ]
$statuslabels = array( 'name' => _x( 'Status', 'taxonomy general name', 'contempo' ), 'singular_name' => _x( 'Status', 'taxonomy singular name', 'contempo' ), 'search_items' => __( 'Search Statuses', 'contempo' ), 'popular_items' => __( 'Popular Statuses', 'contempo' ), 'all_items' => __( 'All Statuses', 'contempo' ), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __( 'Edit Statuses', 'contempo' ), 'update_item' => __( 'Update Statuses', 'contempo' ), 'add_new_item' => __( 'Add New Status', 'contempo' ), 'new_item_name' => __( 'New Status Name', 'contempo' ), 'separate_items_with_commas' => __( 'Separate Statuses with commas', 'contempo' ), 'add_or_remove_items' => __( 'Add or remove Status', 'contempo' ), 'choose_from_most_used' => __( 'Choose from the most used Statuses', 'contempo' ) ); register_taxonomy( 'status', 'listings', array( 'hierarchical' => false, 'labels' => $statuslabels, 'show_ui' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'status' ), )); function status() { global $post; global $wp_query; $terms_as_text = strip_tags( get_the_term_list( $wp_query->post->ID, 'status', '', ', ', '' ) ); echo $terms_as_text; }I successfully registered custom taxonomy in admin->post sidebar.
However it generates input text.
Does anyone knows to turn input[‘text’] from taxonomy box to dropdown selection.
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
The topic ‘Custom taxonomy’ is closed to new replies.