テンプレートの組込関数

ヘッダー部分を組み込む

get_header();

複数のヘッダー部分の使い分け

get_header(‘接尾語’);

例:archive.php → header-archive.php

get_header(‘archive’);

フッターを組み込む

get_footer();

同じく、get_footer(‘archive’);でarchive.phpのみに特定のフッターをつけることができる。

サイドバーを組み込む

get_sidebar();

検索フォームテンプレートを組み込む

get_search_form();

search.phpを読み込みます。

任意のテンプレートを組み込む

get_template_part(”);

common.phpを読み込むには

get_template_part(‘common’);

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

WP-SpamFree by Pole Position Marketing