kpirnie

KB Tax

May 25th, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1.         // create the kb_categories taxonomy
  2.         register_taxonomy( 'kb_categories', 'gyo_kb', array(
  3.             'label' => __( 'KB Categories' ),
  4.             'rewrite' => array( 'slug' => $_cat_rewrite ),
  5.             'hierarchical' => true,
  6.             'public' => true,
  7.             'publicly_queryable' => true,
  8.             'show_in_rest' => true,
  9.             'show_admin_column' => true,
  10.         ) );
  11.         flush_rewrite_rules( );
  12.        
  13.         // create the kb_tags taxonomy
  14.         register_taxonomy( 'kb_tags', 'gyo_kb', array(
  15.             'label' => __( 'KB Tags' ),
  16.             'rewrite' => array( 'slug' => $_tag_rewrite ),
  17.             'hierarchical' => false,
  18.             'public' => true,
  19.             'publicly_queryable' => true,
  20.             'show_in_rest' => true,
  21.             'show_admin_column' => true,
  22.         ) );
  23.         flush_rewrite_rules( );
Advertisement
Add Comment
Please, Sign In to add comment