Advertisement
pusatdata

Memisahkan Kode dari Function.php dan Memanggilnya

Jan 24th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. Misalnya di dalam folder Template kita bikin folder baru dengan nama: product, diisi 3 file:
  2. – post-type.php
  3. – taxonomy.php
  4. – metaboxes.php
  5.  
  6. Cara memasukkan kode yang seharusnya untuk function.php masukkan ke masing-masing file. Setiap isi file dimulai dengan <?php, tanpa penutup ?>
  7.  
  8. Cara memanggil fle agar dimasukkan ke function.php:
  9. require get_template_directory() . '/products/post-type.php';
  10. require get_template_directory() . '/products/taxonomy.php';
  11. require get_template_directory() . '/products/metaboxes.php';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement