Sacconi69

"intro" taxonomy

Apr 8th, 2024
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. function cptui_register_my_taxes2() {
  2.  
  3. /**
  4. * Taxonomy: intro.
  5. */
  6.  
  7. $labels = [
  8. "name" => esc_html__( "Introductions", "sacconicase" ),
  9. "singular_name" => esc_html__( "Introduction", "sacconicase" ),
  10. ];
  11.  
  12.  
  13. $args = [
  14. "label" => esc_html__( "Introductions", "sacconicase" ),
  15. "labels" => $labels,
  16. "public" => true,
  17. "publicly_queryable" => true,
  18. "hierarchical" => true,
  19. "show_ui" => true,
  20. "show_in_menu" => true,
  21. "show_in_nav_menus" => true,
  22. "query_var" => true,
  23. "rewrite" => [ 'slug' => 'intro', 'with_front' => true, ],
  24. "show_admin_column" => false,
  25. "show_in_rest" => true,
  26. "show_tagcloud" => false,
  27. "rest_base" => "intro",
  28. "rest_controller_class" => "WP_REST_Terms_Controller",
  29. "rest_namespace" => "wp/v2",
  30. "show_in_quick_edit" => false,
  31. "sort" => false,
  32. "show_in_graphql" => false,
  33. "meta_box_cb" => "post_tags_meta_box",
  34. ];
  35. register_taxonomy( "intro", [ "post" ], $args );
  36. }
  37. add_action( 'init', 'cptui_register_my_taxes2' );
  38.  
  39.  
Advertisement
Add Comment
Please, Sign In to add comment