pusatdata

KODE POST INDEPENDENT

Jun 14th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. KODE POST INDEPENDENT >> contoh: perpustakaan masjid
  2.  
  3. masukkan kode ini di functions.php:
  4. require_once('functions/theme-post-type.php');
  5.  
  6. masukkan kode ini di dalam file theme-post-type.php
  7.  
  8. <?php
  9.  
  10. add_action( 'init', 'create_post_type' );
  11.  
  12. function create_post_type() {
  13.  
  14. require_once('post/slide.php');
  15. require_once('post/agenda.php');
  16. require_once('post/pengumuman.php');
  17. require_once('post/info.php');
  18. require_once('post/tausiyah.php');
  19.  
  20. require_once('jadwal/shalat.php');
  21. require_once('jadwal/jumat.php');
  22. require_once('jadwal/ramadhan.php');
  23.  
  24. require_once('laporan/infaq.php');
  25. require_once('laporan/keuangan.php');
  26.  
  27. require_once('masjid/lembaga.php');
  28. require_once('masjid/layanan.php');
  29. require_once('masjid/inventaris.php');
  30. require_once('masjid/perpustakaan.php');
  31.  
  32. require_once('post/galeri.php');
  33. require_once('post/video.php');
  34. }
  35.  
  36. require_once('theme-taxonomy.php');
  37.  
  38. ?>
  39.  
  40. masukkan kode ini dalam post/tausiyah.php
  41.  
  42. <?php
  43.  
  44. /*** POST TYPE TAUSIYAH ***/
  45.  
  46. register_post_type( 'tausiyah',
  47. array(
  48. 'menu_icon' => 'dashicons-format-status',
  49. 'labels' => array(
  50. 'name' => __( 'Tausiyah' ),
  51. 'singular_name' => __( 'Tausiyah' ),
  52. 'add_new' => __( 'Tambah Tausiyah?' ),
  53. 'add_new_item' => __( 'Tambah Tausiyah' ),
  54. 'edit' => __( 'Edit' ),
  55. 'edit_item' => __( 'Edit Tausiyah' ),
  56. 'new_item' => __( 'Tausiyah Baru' ),
  57. 'view' => __( 'Lihat Tausiyah' ),
  58. 'view_item' => __( 'Lihat Tausiyah' ),
  59. 'search_items' => __( 'Cari Tausiyah' ),
  60. 'not_found' => __( 'Tidak ada Tausiyah ditemukan' ),
  61. 'not_found_in_trash' => __( 'Tidak ada Tausiyah di folder Trash' ),
  62. 'parent' => __( 'Parent Super Duper' ),
  63. ),
  64. 'public' => true,
  65. 'has_archive' => true,
  66. 'supports' => array( 'title', 'editor', 'thumbnail'),
  67. 'exclude_from_search' => false,
  68. )
  69. );
  70.  
  71. ?>
Add Comment
Please, Sign In to add comment