wpexplorer

WordPress Portfolio Tags Taxonomy

Jul 1st, 2013
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.09 KB | None | 0 0
  1. add_action( 'init', 'wpex_portfolio_tag_tax' );
  2. function wpex_portfolio_tag_tax() {
  3.    
  4.     //portfolio tag tax labels
  5.     $wpex_portfolio_tag_labels = array(
  6.         'name' => __( 'Portfolio Tags', 'wpex' ),
  7.         'singular_name' => __( 'Portfolio Tag', 'wpex' ),
  8.         'search_items' =>  __( 'Search Portfolio Tags', 'wpex' ),
  9.         'all_items' => __( 'All Portfolio Tags', 'wpex' ),
  10.         'parent_item' => __( 'Parent Portfolio Tag', 'wpex' ),
  11.         'parent_item_colon' => __( 'Parent Portfolio Tag:', 'wpex' ),
  12.         'edit_item' => __( 'Edit Portfolio Tag', 'wpex' ),
  13.         'update_item' => __( 'Update Portfolio Tag', 'wpex' ),
  14.         'add_new_item' => __( 'Add New Portfolio Tag', 'wpex' ),
  15.         'new_item_name' => __( 'New Portfolio Tag Name', 'wpex' ),
  16.         'choose_from_most_used' => __( 'Choose from the most used portfolio categories', 'wpex' )
  17.     );
  18.    
  19.    
  20.     //register portfolio tag tax
  21.     register_taxonomy('portfolio_tag','portfolio',array(
  22.         'hierarchical' => true,
  23.         'labels' => apply_filters('wpex_portfolio_tax_labels', $wpex_portfolio_tag_labels),
  24.         'query_var' => true,
  25.         'rewrite' => array( 'slug' => 'portfolio-category' ),
  26.     ));
  27.    
  28. }
Advertisement
Add Comment
Please, Sign In to add comment