Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement