Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function create_post_type_producten() {
- register_post_type( 'producten',
- array(
- 'labels' => array(
- 'name' => _x('Producten', 'post type general name'),
- 'singular_name' => _x('Producten', 'post type singular name'),
- 'add_new' => _x('Nieuw product', 'Frontpage Slider'),
- 'add_new_item' => __('Nieuw product'),
- 'edit_item' => __('Bewerk product'),
- 'new_item' => __('Nieuwe product'),
- 'view_item' => __('Bekijk product'),
- ),
- 'show_ui' => true,
- 'public' => true,
- 'has_archive' => true,
- 'hierarchical' => false,
- 'show_in_nav_menus' => true,
- 'rewrite' => array( 'slug' => 'producten', 'with_front' => FALSE),
- 'supports' => array ('title', 'editor', 'author', 'custom-fields'),
- ));
- }add_action( 'init', 'create_post_type_producten' );
- function my_custom_taxonomies_products() {
- register_taxonomy(
- 'product_categorie', // internal name = machine-readable taxonomy name
- 'producten', // object type = post, page, link, or custom post-type
- array(
- 'hierarchical' => true,
- 'label' => 'Product categorie', // the human-readable taxonomy name
- 'query_var' => true, // enable taxonomy-specific querying
- 'rewrite' => array( 'slug' => 'producten/categorie', 'hierarchical' => true),
- )
- );
- }
- add_action('init', 'my_custom_taxonomies_products', 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement