Skip to content

Instantly share code, notes, and snippets.

@kevinwhoffman
Last active February 8, 2016 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinwhoffman/506cc0443f6778611133 to your computer and use it in GitHub Desktop.
Save kevinwhoffman/506cc0443f6778611133 to your computer and use it in GitHub Desktop.
Taxonomy w/ Hierarchical URLs
<?php
$labels = array(
'name' => 'Regions',
'label' => 'Regions'
);
$args = array(
'labels' => $labels,
'hierarchical' => true,
'label' => 'Regions',
'show_ui' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'regions', 'with_front' => true, 'hierarchical' => true ),
'show_admin_column' => false
);
register_taxonomy( 'region', array( 'property' ), $args );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment