テンプレートの組込関数
ヘッダー部分を組み込む
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’);