$section) {
switch ($section){
case 'breadcrumbs':
if(!$switch['is_front_page']){
get_template_part( 'inc/breadcrumbs' );
neatly_breadcrumb_list();
}
break;
case 'title':
if($format != 'aside' && $format != 'link' && $format != 'status'){
get_template_part( 'template-parts/single/single',$section );
$vf = 'neatly_' . $section . '_' . $type;
$vf();
}
break;
case 'author':
if(!$switch['is_front_page']){
get_template_part( 'template-parts/single/single',$section );
$vf = 'neatly_' . $section . '_' . $type;
$vf();
}
break;
case 'pv':
if( isset($yahman_addons_option['pv']['enable']) ){
$period = get_theme_mod( 'neatly_pageview','none');
if( $period != 'none' && ( get_theme_mod( 'neatly_pageview_logout',false) || is_user_logged_in() ) ){
$count_key = '_yahman_addons_pv_';
$pv_count = get_post_meta($post->ID, $count_key.$period, true);
if($pv_count != ''){
echo '
'. $pv_count .'
';
}
}
}
break;
case 'thumbnail':
if(has_post_thumbnail()) {/*サムネイルがある場合*/
if($type === 'post'){
$thum_size = get_theme_mod( 'neatly_post_thum_size','large');
}else{
$thum_size = get_theme_mod( 'neatly_page_thum_size','large');
}
echo '';
the_post_thumbnail($thum_size);
echo ' ';
}
break;
case 'content':
echo '';
the_content();
echo ' ';
break;
case 'widget_1':
case 'widget_2':
case 'widget_3':
case 'widget_4':
case 'widget_5':
if($type === 'post'){
$widget_name = 'post_'.$section;
}else{
$widget_name = 'page_'.$section;
}
/*記事下のウィジェット*/
if ( is_active_sidebar( $widget_name ) ) : ?>
';
foreach($categories as $category) {
echo ''. esc_html($category->cat_name). ' ';
}
echo '';
}
}
break;
case 'tag':
if(!$switch['is_front_page']){
$result = true;
if($type === 'page'){
if(!has_tag() && !$pwcat )$result = false;
}
if($result){
$post_tags = get_the_tags( get_the_ID() );
if(!empty($post_tags) ){
echo '';
}
}
}
break;
case 'adjacent':
if(!$switch['is_front_page']){
//adjacent
get_template_part( 'template-parts/single/single','adjacent' );
}
break;
case 'comment':
if(!$switch['is_front_page']){
/* If comments are open or we have at least one comment, load up the comment template.*/
if ( comments_open() || get_comments_number() ){
comments_template();
}
}
break;
default:
/*どれでも無い*/
}
}//end foreach
}