기본페이지 is_home() 조건에 사용되는 템플릿입니다.
<?php get_header ?>
if ( is_home() ) {
// This is the blog posts index
get_sidebar( 'blog' );
} else {
// This is not the blog posts index
get_sidebar();
}
<?php get_footer ?>is_home() : 현재 페이지가 홈페이지인지 체크합니다.
get_sidebar( 'blog' ) 는 활성화된 테마 폴더에 있는 sidebar-blog.php 를 불러들입니다.
get_sidebar() 는 활성화된 테마 폴더에 있는 sidebar.php 를 불러들입니다