Created
October 20, 2016 04:23
-
-
Save hannit/211f49095f1ffe02e60d2d51a1c2c7d6 to your computer and use it in GitHub Desktop.
Add TAX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! function_exists( 'nok_area_type' ) ) { | |
// Register Custom Taxonomy | |
function nok_area_type() { | |
$labels = array( | |
'name' => _x( 'Area Types', 'Taxonomy General Name', 'nok' ), | |
'singular_name' => _x( 'Area Type', 'Taxonomy Singular Name', 'nok' ), | |
'menu_name' => __( 'Area Type', 'nok' ), | |
'all_items' => __( 'All Items', 'nok' ), | |
'parent_item' => __( 'Parent Item', 'nok' ), | |
'parent_item_colon' => __( 'Parent Item:', 'nok' ), | |
'new_item_name' => __( 'New Item Name', 'nok' ), | |
'add_new_item' => __( 'Add New Item', 'nok' ), | |
'edit_item' => __( 'Edit Item', 'nok' ), | |
'update_item' => __( 'Update Item', 'nok' ), | |
'view_item' => __( 'View Item', 'nok' ), | |
'separate_items_with_commas' => __( 'Separate items with commas', 'nok' ), | |
'add_or_remove_items' => __( 'Add or remove items', 'nok' ), | |
'choose_from_most_used' => __( 'Choose from the most used', 'nok' ), | |
'popular_items' => __( 'Popular Items', 'nok' ), | |
'search_items' => __( 'Search Items', 'nok' ), | |
'not_found' => __( 'Not Found', 'nok' ), | |
'no_terms' => __( 'No items', 'nok' ), | |
'items_list' => __( 'Items list', 'nok' ), | |
'items_list_navigation' => __( 'Items list navigation', 'nok' ), | |
); | |
$args = array( | |
'labels' => $labels, | |
'hierarchical' => true, | |
'public' => true, | |
'show_ui' => true, | |
'show_admin_column' => true, | |
'show_in_nav_menus' => true, | |
'show_tagcloud' => true, | |
); | |
register_taxonomy( 'area_type', array( 'attraction' ), $args ); | |
} | |
add_action( 'init', 'nok_area_type', 0 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment