retesere20

recycled-cpt-sample

Jan 30th, 2021
22
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. /*
  3.  
  4. // add_action( 'init', [$this, 'my_custom_postypess'], 0 );
  5. function my_custom_postypess()
  6. {
  7.  
  8. // VIDEO
  9. $args = array('label' => __( 'Videos'), 'description' => __( 'videoebi'),
  10. 'labels' => array( ),
  11. 'supports' => array('title','editor', 'thumbnail', 'excerpt' , ), // 'page-attributes',
  12. 'taxonomies' => array('category',), 'hierarchical' => true,
  13. 'public' => true, 'show_ui' => true, 'show_in_menu' => true,
  14. 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 16,
  15. 'menu_icon' => '', 'can_export' => true, 'has_archive' => true,
  16. 'exclude_from_search' => false, 'publicly_queryable'=> true, 'capability_type'=> 'post',
  17. );
  18. register_post_type( 'vvid', $args );
  19.  
  20.  
  21.  
  22. // AUDIO
  23. $args = array
  24. (
  25. 'label' => __( 'Audios'), 'description' => __( 'audioebi'),
  26. 'labels' => array(),
  27. 'supports' => array('title','editor', 'thumbnail', 'excerpt' ),
  28. 'taxonomies' => array('category',), // array( 'category', 'post_tag' );
  29. 'hierarchical' => true,
  30. 'public' => true, 'show_ui' => true, 'show_in_menu' => true,
  31. 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 17,
  32. 'menu_icon' => '', 'can_export' => true, 'has_archive' => true,
  33. 'exclude_from_search' => false, 'publicly_queryable'=> true, 'capability_type'=> 'post',
  34. 'publicly_queryable' => true, 'query_var' => true, //'rewrite' => false,
  35. );
  36.  
  37. global $odd;
  38. register_post_type( 'aaud', $args );
  39.  
  40.  
  41.  
  42. // BOOK
  43. $args = array(
  44. 'label' => __( 'Wignebi'), 'description' => __( 'wignebii'),
  45. 'labels' => array(),
  46. 'supports' => array('title','editor', 'thumbnail', 'excerpt' ),
  47. 'taxonomies' => array('category',), 'hierarchical' => true, // array( 'category', 'post_tag' )
  48. 'public' => true, 'show_ui' => true, 'show_in_menu' => true,
  49. 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 18,
  50. 'menu_icon' => '', 'can_export' => true, 'has_archive' => true,
  51. 'exclude_from_search' => false, 'publicly_queryable'=> true, 'capability_type'=> 'post',
  52. );
  53. global $odd;
  54. register_post_type( 'wwig', $args );
  55.  
  56. }
  57.  
  58. */
  59.  
RAW Paste Data