Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- KODE POST INDEPENDENT >> contoh: perpustakaan masjid
- masukkan kode ini di functions.php:
- require_once('functions/theme-post-type.php');
- masukkan kode ini di dalam file theme-post-type.php
- <?php
- add_action( 'init', 'create_post_type' );
- function create_post_type() {
- require_once('post/slide.php');
- require_once('post/agenda.php');
- require_once('post/pengumuman.php');
- require_once('post/info.php');
- require_once('post/tausiyah.php');
- require_once('jadwal/shalat.php');
- require_once('jadwal/jumat.php');
- require_once('jadwal/ramadhan.php');
- require_once('laporan/infaq.php');
- require_once('laporan/keuangan.php');
- require_once('masjid/lembaga.php');
- require_once('masjid/layanan.php');
- require_once('masjid/inventaris.php');
- require_once('masjid/perpustakaan.php');
- require_once('post/galeri.php');
- require_once('post/video.php');
- }
- require_once('theme-taxonomy.php');
- ?>
- masukkan kode ini dalam post/tausiyah.php
- <?php
- /*** POST TYPE TAUSIYAH ***/
- register_post_type( 'tausiyah',
- array(
- 'menu_icon' => 'dashicons-format-status',
- 'labels' => array(
- 'name' => __( 'Tausiyah' ),
- 'singular_name' => __( 'Tausiyah' ),
- 'add_new' => __( 'Tambah Tausiyah?' ),
- 'add_new_item' => __( 'Tambah Tausiyah' ),
- 'edit' => __( 'Edit' ),
- 'edit_item' => __( 'Edit Tausiyah' ),
- 'new_item' => __( 'Tausiyah Baru' ),
- 'view' => __( 'Lihat Tausiyah' ),
- 'view_item' => __( 'Lihat Tausiyah' ),
- 'search_items' => __( 'Cari Tausiyah' ),
- 'not_found' => __( 'Tidak ada Tausiyah ditemukan' ),
- 'not_found_in_trash' => __( 'Tidak ada Tausiyah di folder Trash' ),
- 'parent' => __( 'Parent Super Duper' ),
- ),
- 'public' => true,
- 'has_archive' => true,
- 'supports' => array( 'title', 'editor', 'thumbnail'),
- 'exclude_from_search' => false,
- )
- );
- ?>
Add Comment
Please, Sign In to add comment