<?php
$loop = new WP_Query( array( 'post_type' => 'wiki' ) );
if ( $loop->have_posts() ) :
while ( $loop->have_posts() ) : $loop->the_post(); ?>
<a href="#" class="media">
<div class="media-left">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail( 'full', array( 'class' => 'media-object' ) );
} else { ?>
<img src="<?php bloginfo('template_directory'); ?>/images/img-dummy.jpg" alt="" class="media-object"/>
<?php } ?>
</div>
<div class="media-body">
<dl class="dl-list-indent dl-date">
<dt>
<span class="label label-dark-yellow">
新着
</span>
</dt>
<dd>
<?php the_time('Y.m.d'); ?>
</dd>
</dl>
<?php the_content(); ?>
</div>
</a>
<?php endwhile;
endif;
wp_reset_postdata();
?>
<?php
$columns_num = 2; // The number of columns we want to display our posts
$i = 0; //Counter for .row divs
echo '<div class="row">';
$loop = new WP_Query( array(
'post_type' => 'news'
) );
if ( $loop->have_posts() ) :
while ($loop->have_posts()) :
$loop->the_post();
echo '<div class="col-sm-' . 12 / $columns_num . '">';
get_template_part('inc/information', get_post_format());
echo '</div>';
if ($i % $columns_num == $columns_num - 1) {
echo '</div> <div class="row">';
}
if ($i == 4) {
break;
}
$i ++;
endwhile;
echo '</div>';
endif; ?>
<div class="row row-35-lg">
<?php
$loop = new WP_Query( array(
'post_type' => 'event_believe'
) );
if ( $loop->have_posts() ) :
while ( $loop->have_posts() ) :
$loop->the_post();
?>
<div class="col-sm-4">
<div class="thumbnail thumbnail-no-border" data-mh="thumbnail">
<a href="<?php getExternalLink(); ?>" <?php getTargetBlankAttr(); ?> class="img-thumbnail hover-img" data-mh="img-thumbnail">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail( 'full', array( 'class' => 'img-responsive center-block' ) );
} else { ?>
<img src="<?php bloginfo('template_directory'); ?>/common/img/img-1.jpg" alt="" class="img-responsive center-block"/>
<?php } ?>
</a>
<div class="caption">
<?php if (get_field("description_event")) {
?>
<div class="text-blue">
<?php echo get_field("description_event"); ?>
</div>
<?php
}
?>
<!-- <dl class="dl-list-indent dl-with-label">
<dt class="text-blue">-->
<!--開催期間:--><?php // echo get_the_date( 'Y/m/d' ); ?>
<?php
// if (!get_next_post_link()) {
// echo '<span class="label label-red">NEW</span>';
// }
//
?>
<?php
// $terms = get_the_terms( $post->ID, 'event_category' );
?>
<!--<span class="label label-blue"><?php // echo $term->name; ?></span>-->
<!-- </dt>
<dd>
</dd>
</dl>-->
<?php
$cf_group = SCF::get('primary-school');
if ($cf_group) {
?>
<div class="row row-2 row-label" data-mh="row-label">
<?php
foreach ($cf_group as $field_name => $field_value) {
?>
<?php if ($field_value['primary_school']): ?>
<div class="col-xs-4 col-sm-2">
<span class="label label-pink"><?php echo nl2br($field_value['primary_school']); ?></span>
</div>
<?php
endif;
}
?>
</div>
<?php
}
?>
<?php
$cf_group = SCF::get('junior-high-school');
if ($cf_group) {
?>
<div class="row row-2 row-label" data-mh="row-label">
<?php
foreach ($cf_group as $field_name => $field_value) {
?>
<?php if ($field_value['junior_high_school']): ?>
<div class="col-xs-4 col-sm-2">
<span class="label label-green"><?php echo nl2br($field_value['junior_high_school']); ?></span>
</div>
<?php
endif;
}
?>
</div>
<?php
}
?>
<?php
$cf_group = SCF::get('high-school');
if ($cf_group) {
?>
<div class="row row-2 row-label" data-mh="row-label">
<?php
foreach ($cf_group as $field_name => $field_value) {
?>
<?php if ($field_value['high_school']): ?>
<div class="col-xs-4 col-sm-2">
<span class="label label-strong-blue"><?php echo nl2br($field_value['high_school']); ?></span>
</div>
<?php
endif;
}
?>
</div>
<?php
}
?>
<div class="text-lg text-strong-blue" data-mh="text-lg">
<?php the_title(); ?>
</div>
<div class="container-btn-link text-right">
<a href="<?php getExternalLink(); ?>" <?php getTargetBlankAttr(); ?> class="text-strong-blue">
READ MORE ▶
</a>
</div>
</div>
</div>
</div>
<?php
endwhile;
endif;
wp_reset_postdata();
?>
</div>