delvinkrasniqi

Untitled

Apr 7th, 2020
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. //create two taxonomies, genres and tags for the post type "tag"
  2. function create_tag_taxonomies()
  3. {
  4. // Add new taxonomy, NOT hierarchical (like tags)
  5. $labels = array(
  6. 'name' => _x( 'Tagsu', 'taxonomy general name' ),
  7. 'singular_name' => _x( 'Tagu', 'taxonomy singular name' ),
  8. 'search_items' => __( 'Search Tags' ),
  9. 'popular_items' => __( 'Popular Tags' ),
  10. 'all_items' => __( 'All Tags' ),
  11. 'parent_item' => null,
  12. 'parent_item_colon' => null,
  13. 'edit_item' => __( 'Edit Tagu' ),
  14. 'update_item' => __( 'Update Tagu' ),
  15. 'add_new_item' => __( 'Add New Tagu' ),
  16. 'new_item_name' => __( 'New Tagu Name' ),
  17. 'separate_items_with_commas' => __( 'Separate tags with commas' ),
  18. 'add_or_remove_items' => __( 'Add or remove tags' ),
  19. 'choose_from_most_used' => __( 'Choose from the most used tags' ),
  20. 'menu_name' => __( 'Tagsu' ),
  21. );
  22.  
  23. register_taxonomy('tagsu','projects' ,array(
  24. 'hierarchical' => false,
  25. 'labels' => $labels,
  26. 'show_ui' => true,
  27. 'update_count_callback' => '_update_post_term_count',
  28. 'query_var' => true,
  29. 'rewrite' => array( 'slug' => 'tags' ),
  30. ));
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment