Wordpess Hack

13
Remastering Theme http://tsauri28.myhaley.com [email protected]

description

Dasar-dasar templating dalam wordpress

Transcript of Wordpess Hack

Page 1: Wordpess Hack

Remastering Theme

http://[email protected]

Page 2: Wordpess Hack

Style.css Index.phpHeader.phpSidebar.phpFooter.phpFunction.phpSingle.phpPage.php

Page 3: Wordpess Hack

Menempatkan style untuk themeMenyimpan data theme

/* Theme Name: MuawanahDescription: 2 Column, CSS, xHTML, JQuery. Download other from

<a href="http://myhaley.com"> HaleyGroup </a> , free !!Version: 0.1Author: Asep Sufyan TsauriAuthor URI: http://www.tsauri28.myhaley.com/*/

/* Style anda disini !!! */

Page 4: Wordpess Hack

Halaman utama yang akan dipanggil awal oleh http

Memanggil file struktur yang lain, seperti header, footer, dsb.

Biasanya digunakan untuk menyimpan headline post

Page 5: Wordpess Hack

Bagian ‘kepala’ struktur wordpressBiasanya untuk menyimpan link ke

style, script dsb

Page 6: Wordpess Hack

Menyimpan widgetDiintegrasikan (dikontrol)

dengan function.php

Page 7: Wordpess Hack

‘kaki’ wordpress

Page 8: Wordpess Hack

Menyimpan function untuk mengatur theme

Paling umum untuk mengontrol sidebar.php

Page 9: Wordpess Hack

Bagian detail post (hasil dari ‘read more…’)

Memanggil file2 lain seperti header, footer, dll (seperti index.php)

Page 10: Wordpess Hack

Sama fungsinya dengan single.php, hanya untuk page

Page 11: Wordpess Hack

Looping post<?php while (have_posts()) : the_post(); ?>

Tampilkan Judul<?php the_title(); ?>

Tampilkan hyperlink post<?php the_permalink() ?>

Tampilkan content<?php the_content(__(‘selanjutnya…')); ?>

Menampilkan Kategori<?php the_category(', ') ?>

Page 12: Wordpess Hack

Tampilkan post dalam kategori tertentu

<?php $my_query = new

WP_Query('category_name=Uncategorized&showposts=4'); ?>

Costum Field<?php get_post_meta($post->ID,'image', true) ) ?>

Page 13: Wordpess Hack

Wordpress.orgWphacks.comWebdesignerwall.comNettuts.comdllllll;