Advertisement
Guest User

Untitled

a guest
Aug 28th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. // Register Custom Taxonomy
  2. function custom_taxonomy() {
  3.  
  4. $labels = array(
  5. 'name' => _x( 'Newsy', 'Taxonomy General Name', 'text_domain' ),
  6. 'singular_name' => _x( 'News', 'Taxonomy Singular Name', 'text_domain' ),
  7. 'menu_name' => __( 'Taxonomy', 'text_domain' ),
  8. 'all_items' => __( 'All Items', 'text_domain' ),
  9. 'parent_item' => __( 'Parent Item', 'text_domain' ),
  10. 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),
  11. 'new_item_name' => __( 'New Item Name', 'text_domain' ),
  12. 'add_new_item' => __( 'Add New Item', 'text_domain' ),
  13. 'edit_item' => __( 'Edit Item', 'text_domain' ),
  14. 'update_item' => __( 'Update Item', 'text_domain' ),
  15. 'view_item' => __( 'View Item', 'text_domain' ),
  16. 'separate_items_with_commas' => __( 'Separate items with commas', 'text_domain' ),
  17. 'add_or_remove_items' => __( 'Add or remove items', 'text_domain' ),
  18. 'choose_from_most_used' => __( 'Choose from the most used', 'text_domain' ),
  19. 'popular_items' => __( 'Popular Items', 'text_domain' ),
  20. 'search_items' => __( 'Search Items', 'text_domain' ),
  21. 'not_found' => __( 'Not Found', 'text_domain' ),
  22. 'no_terms' => __( 'No items', 'text_domain' ),
  23. 'items_list' => __( 'Items list', 'text_domain' ),
  24. 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),
  25. );
  26. $args = array(
  27. 'labels' => $labels,
  28. 'hierarchical' => true,
  29. 'public' => true,
  30. 'show_ui' => true,
  31. 'show_admin_column' => true,
  32. 'show_in_nav_menus' => true,
  33. 'show_tagcloud' => true,
  34. );
  35. register_taxonomy( 'newsy', array( 'nerws' ), $args );
  36.  
  37. }
  38. add_action( 'init', 'custom_taxonomy', 0 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement