Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Kalau Membuat Template Category, Tags, dan Archive tapa perlu Plugin.
- Untuk Membuat Template Post harus Menggunakan Plugin.
- Cara membuat single template flexithemes
- 1. Instal plugin: https://wordpress.org/plugins/single-post-template/
- 2. copy post.php menjadi post-single-slug.php, letakkan kode berikut paling atas:
- <?php
- /*
- Single Post Template: post-single-slug
- Description: This part is optional, but helpful for describing the Post Template
- */
- ?>
- 3. copy single.php menjadi single-slug.php
- 4. edit single-slug.php, ganti seperti berikut:
- <?php
- if (have_posts()) : while (have_posts()) : the_post();
- /**
- * Find the post formatting for the single post (full post view) in the post-single.php file
- */
- get_template_part('post-single-SLUG', 'single-SLUG');
- endwhile;
- else :
- get_template_part('post-single-SLUG', 'noresults');
- endif;
- ?>
- 5. Pilihan template muncul pasa saat kita posting.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement