initfest/page-speakers.php

43 lines
992 B
PHP
Raw Normal View History

2014-10-05 03:48:16 +03:00
<?php
2014-10-12 13:00:46 +03:00
/*
* Template Name: Speakers
*/
2014-10-05 03:48:16 +03:00
get_header(); ?>
<div class="separator"></div>
<section class="content grid">
<div class="col-left">
<h1 class="big">Лектори</h1>
<?php
2014-10-12 13:00:46 +03:00
$speakers_args = array( 'post_type' => 'speakers', 'nopaging' => 'true', 'order' => 'ASC' );
2014-10-05 03:48:16 +03:00
$speakers = new WP_Query( $speakers_args );
if ( $speakers->have_posts() ) :
while ( $speakers->have_posts() ) : $speakers->the_post();
?>
<div class="speaker">
<?php
if ( has_post_thumbnail() ) {
2014-10-12 13:00:46 +03:00
the_post_thumbnail(array(100, 100));
2014-10-05 03:48:16 +03:00
} else {
?>
2014-10-12 13:00:46 +03:00
<img src="/img/speaker.jpg">
2014-10-05 03:48:16 +03:00
<?php
}
?>
<h3><?php the_title(); ?></h3>
<?php
the_content();
?>
</div>
<?php
endwhile;
wp_reset_postdata();
endif;
?>
</div>
2014-10-07 14:52:34 +03:00
<?php # get_sidebar(); ?>
2014-10-05 03:48:16 +03:00
</section>
<?php get_footer(); ?>