Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. $statuslabels = array(
  2. 'name' => _x( 'Status', 'taxonomy general name', 'contempo' ),
  3. 'singular_name' => _x( 'Status', 'taxonomy singular name', 'contempo' ),
  4. 'search_items' => __( 'Search Statuses', 'contempo' ),
  5. 'popular_items' => __( 'Popular Statuses', 'contempo' ),
  6. 'all_items' => __( 'All Statuses', 'contempo' ),
  7. 'parent_item' => null,
  8. 'parent_item_colon' => null,
  9. 'edit_item' => __( 'Edit Statuses', 'contempo' ),
  10. 'update_item' => __( 'Update Statuses', 'contempo' ),
  11. 'add_new_item' => __( 'Add New Status', 'contempo' ),
  12. 'new_item_name' => __( 'New Status Name', 'contempo' ),
  13. 'separate_items_with_commas' => __( 'Separate Statuses with commas', 'contempo' ),
  14. 'add_or_remove_items' => __( 'Add or remove Status', 'contempo' ),
  15. 'choose_from_most_used' => __( 'Choose from the most used Statuses', 'contempo' )
  16. );
  17. register_taxonomy( 'status', 'listings', array(
  18. 'hierarchical' => false,
  19. 'labels' => $statuslabels,
  20. 'show_ui' => true,
  21. 'query_var' => true,
  22. 'rewrite' => array( 'slug' => 'status' ),
  23. ));
  24.  
  25. function status() {
  26. global $post;
  27. global $wp_query;
  28. $terms_as_text = strip_tags( get_the_term_list( $wp_query->post->ID, 'status', '', ', ', '' ) );
  29. echo $terms_as_text;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement