Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'init', 'wpex_portfolio_tag_tax' );
- function wpex_portfolio_tag_tax() {
- //portfolio tag tax labels
- $wpex_portfolio_tag_labels = array(
- 'name' => __( 'Portfolio Tags', 'wpex' ),
- 'singular_name' => __( 'Portfolio Tag', 'wpex' ),
- 'search_items' => __( 'Search Portfolio Tags', 'wpex' ),
- 'all_items' => __( 'All Portfolio Tags', 'wpex' ),
- 'parent_item' => __( 'Parent Portfolio Tag', 'wpex' ),
- 'parent_item_colon' => __( 'Parent Portfolio Tag:', 'wpex' ),
- 'edit_item' => __( 'Edit Portfolio Tag', 'wpex' ),
- 'update_item' => __( 'Update Portfolio Tag', 'wpex' ),
- 'add_new_item' => __( 'Add New Portfolio Tag', 'wpex' ),
- 'new_item_name' => __( 'New Portfolio Tag Name', 'wpex' ),
- 'choose_from_most_used' => __( 'Choose from the most used portfolio categories', 'wpex' )
- );
- //register portfolio tag tax
- register_taxonomy('portfolio_tag','portfolio',array(
- 'hierarchical' => true,
- 'labels' => apply_filters('wpex_portfolio_tax_labels', $wpex_portfolio_tag_labels),
- 'query_var' => true,
- 'rewrite' => array( 'slug' => 'portfolio-category' ),
- ));
- }
Advertisement
Add Comment
Please, Sign In to add comment