Advertisement
ssaidz

[WORDPRESS] CUSTOM POST TYPE

Oct 14th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.95 KB | None | 0 0
  1. // Saidz.INFO
  2.  
  3. function my_custom_post_produk() {
  4. $labels = array(
  5. 'name' => _x( 'produk', 'post type general name' ),
  6. 'singular_name' => _x( 'produk', 'post type singular name' ),
  7. 'add_new' => _x( 'Tambahkan', 'book' ),
  8. 'add_new_item' => __( 'Tambah produk' ),
  9. 'edit_item' => __( 'Edit produk' ),
  10. 'new_item' => __( 'New produk' ),
  11. 'all_items' => __( 'Semua produk' ),
  12. 'view_item' => __( 'Lihat produk' ),
  13. 'search_items' => __( 'Search produks' ),
  14. 'not_found' => __( 'Tidak di temukan produk' ),
  15. 'not_found_in_trash' => __( 'Tidak ditemukan produk dalam trash' ),
  16. 'parent_item_colon' => '',
  17. 'menu_name' => 'produk'
  18. );
  19. $args = array(
  20. 'labels' => $labels,
  21. 'description' => 'Holds our produks and produk specific data',
  22. 'public' => true,
  23. 'menu_position' => 5,
  24. 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),
  25. 'has_archive' => true,
  26. );
  27. register_post_type( 'produk', $args );
  28. }
  29. add_action( 'init', 'my_custom_post_produk' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement