Advertisement
firoze

taxonomy.php

Dec 13th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. function twenty_slider(){
  2.     register_taxonomy(
  3.         'twenty_slider_category',  //The name of the taxonomy. Name should be in slug form (must not contain capital letters or spaces).
  4.         'twenty_slider',         //post type name
  5.         array(
  6.             'hierarchical'      => true,
  7.             'label'             => 'Twenty Slider Category',  //Display name
  8.             'query_var'         => true,
  9.             'rewrite'           => array(
  10.                 'slug'          => 'twenty/slider/category', // This controls the base slug that will display before each term
  11.                 'with_front'    => false // Don't display the category base before
  12.                 )
  13.             )
  14.     );
  15.     // add another taxonomy
  16.  }
  17. add_action ('init' , 'twenty_slider');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement