Advertisement
Guest User

Untitled

a guest
Jan 17th, 2012
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. function create_post_type_producten() {
  2. register_post_type( 'producten',
  3. array(
  4. 'labels' => array(
  5. 'name' => _x('Producten', 'post type general name'),
  6. 'singular_name' => _x('Producten', 'post type singular name'),
  7. 'add_new' => _x('Nieuw product', 'Frontpage Slider'),
  8. 'add_new_item' => __('Nieuw product'),
  9. 'edit_item' => __('Bewerk product'),
  10. 'new_item' => __('Nieuwe product'),
  11. 'view_item' => __('Bekijk product'),
  12. ),
  13. 'show_ui' => true,
  14. 'public' => true,
  15. 'has_archive' => true,
  16. 'hierarchical' => false,
  17. 'show_in_nav_menus' => true,
  18. 'rewrite' => array( 'slug' => 'producten', 'with_front' => FALSE),
  19. 'supports' => array ('title', 'editor', 'author', 'custom-fields'),
  20. ));
  21.  
  22. }add_action( 'init', 'create_post_type_producten' );
  23.  
  24.  
  25. function my_custom_taxonomies_products() {
  26. register_taxonomy(
  27. 'product_categorie', // internal name = machine-readable taxonomy name
  28. 'producten', // object type = post, page, link, or custom post-type
  29. array(
  30. 'hierarchical' => true,
  31. 'label' => 'Product categorie', // the human-readable taxonomy name
  32. 'query_var' => true, // enable taxonomy-specific querying
  33. 'rewrite' => array( 'slug' => 'producten/categorie', 'hierarchical' => true),
  34.  
  35. )
  36. );
  37. }
  38. add_action('init', 'my_custom_taxonomies_products', 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement