前提・実現したいこと
wordpressのトップページで最新記事のみ大きく表示させたいと思っています。
以下のようにindex.phpに記述していますが、最新記事を大きく表示させるための記述はどこにどのようなものを追加すれば良いのでしょうか。テーマは DigiPressのCOLORSです。
<?php
// **********************************
// Header
// **********************************
get_header();
// **********************************
// Check column
// **********************************
$col_class = '';
switch ($COLUMN_NUM) {
case 1:
$col_class = ' one-col';
break;
case 2:
$col_class = ' two-col';
break;
case 3:
$col_class = ' three-col';
break;
}
// **********************************
// Main container
// **********************************
if (is_front_page() && !is_paged()) :
?>
<main id="main" role="main" class="home">
<?php
else: // is_front_page() && !is_paged()
?>
<main id="main" role="main" class="not-home">
<?php
endif; // end of is_front_page() && !is_paged()
// ***********************************
// Bread crumb
// ***********************************
if(is_paged()) {
echo dp_breadcrumb(false);
}
// **********************************
// Container widget
// **********************************
if (is_active_sidebar('widget-container-top')) {?>
<div id="widget-container-top" class="widget-content one-col clearfix"><?php
if (isset($options_visual['full_wide_container_widget_area_top']) && !empty($options_visual['full_wide_container_widget_area_top'])) {
ob_start(); ?>
<div class="widget-container-inner liquid"><?php
dynamic_sidebar('widget-container-top'); ?>
</div><?php
$widget_container_top_content = ob_get_contents();
ob_end_clean();
} else {
ob_start(); ?>
<div class="widget-container-inner"><?php
dynamic_sidebar('widget-container-top'); ?>
</div><?php
$widget_container_top_content = ob_get_contents();
ob_end_clean();
}
echo $widget_container_top_content; ?>
</div><?php
}?>
<div id="main-content" class="clearfix">
<?php
if (have_posts()):
// **********************************
// Main content
// **********************************?>
<div id="content" class="content<?php echo $col_class; ?>">
<?php
// ***********************************
// Content top widget
// ***********************************
if (is_active_sidebar('widget-content-top')) :
?>
<div id="widget-content-top" class="widget-content top<?php echo $col_class; ?> clearfix">
<?php dynamic_sidebar( 'widget-content-top' ); ?>
</div>
<?php
endif; // is_active_sidebar('widget-content-top')
// ***********************************
// Articles
// ***********************************
include (TEMPLATEPATH . "/article-loop.php");
// ***********************************
// Content bottom widget
// ***********************************
if (is_active_sidebar('widget-content-bottom')) :
?>
<div id="widget-content-bottom" class="widget-content bottom<?php echo $col_class; ?> clearfix">
<?php dynamic_sidebar( 'widget-content-bottom' ); ?>
</div>
<?php
endif; // is_active_sidebar('widget-content-bottom')
?>
</div><?php //end of content
// ***********************************
// Sidebar
// ***********************************
if ( $COLUMN_NUM !== 1 ) :
get_sidebar();
endif;
else : // have_posts()
// **********************************
// PAGE NOT FOUND -if have_posts()-
// **********************************
include (TEMPLATEPATH . "/inc/scr/not_found.php");
endif;
?>
</div><?php //end of main-content ?>
</main><?php //end of main ?>
</div><?php //end of wrapper ?>
<?php get_footer(); ?>
</body>
</html>
こんな感じのイメージです。よろしくお願いいたします。