speaker page template
This commit is contained in:
parent
c8afec5e41
commit
7fd8c66edd
|
@ -1,90 +1,30 @@
|
|||
<?php
|
||||
/*
|
||||
* Template Name: Speakers
|
||||
*/
|
||||
|
||||
/* Template Name: Speakers */
|
||||
get_header();
|
||||
|
||||
if ( preg_match('/^(schedule|programa|speakers|halls)/', $pagename) ) {
|
||||
wp_nav_menu( array( 'theme_location' => 'footer-schedule', 'container_class' => 'content subnav cf' ) );
|
||||
}
|
||||
|
||||
$content = require __DIR__ . DIRECTORY_SEPARATOR . 'schedule' . DIRECTORY_SEPARATOR . 'parse.php';
|
||||
//var_dump($data);
|
||||
?>
|
||||
<div class="separator"></div>
|
||||
<section class="content grid">
|
||||
<div class="col-left">
|
||||
<h1 class="big"><?php e_('Лектори'); ?></h1>
|
||||
<h1>Лектори</h1>
|
||||
|
||||
<div class="grid members">
|
||||
<?php
|
||||
$speakers_args = array( 'post_type' => 'speakers', 'nopaging' => 'true', 'order' => 'ASC' );
|
||||
$speakers = new WP_Query( $speakers_args );
|
||||
|
||||
if ( $speakers->have_posts() ) :
|
||||
while ( $speakers->have_posts() ) : $speakers->the_post();
|
||||
?>
|
||||
<div class="member col4">
|
||||
|
||||
<a href="#<?php the_title(); ?>">
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail(array(100, 100));
|
||||
} else {
|
||||
?>
|
||||
<img src="/img/speaker.jpg">
|
||||
<?php
|
||||
foreach ($content['gspk'] as $line) {
|
||||
echo $line, PHP_EOL;
|
||||
}
|
||||
?><br>
|
||||
<?php the_title(); ?>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
endif;
|
||||
?>
|
||||
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
<?php
|
||||
$speakers_args = array( 'post_type' => 'speakers', 'nopaging' => 'true', 'order' => 'ASC' );
|
||||
$speakers = new WP_Query( $speakers_args );
|
||||
|
||||
if ( $speakers->have_posts() ) :
|
||||
while ( $speakers->have_posts() ) : $speakers->the_post();
|
||||
?>
|
||||
<div class="speaker" id="<?php the_title() ?>">
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail(array(100, 100));
|
||||
} else {
|
||||
?>
|
||||
<img src="/img/speaker.jpg">
|
||||
<?php
|
||||
foreach ($content['fspk'] as $line) {
|
||||
echo $line, PHP_EOL;
|
||||
}
|
||||
?>
|
||||
<h3><?php the_title(); ?></h3>
|
||||
<div class="icons">
|
||||
<?php
|
||||
$custom = get_post_custom();
|
||||
if (!empty($custom['twitter'])) echo '<a href="https://twitter.com/'.$custom['twitter'][0].'"><i class="fa fa-twitter"></i></a>';
|
||||
if (!empty($custom['github'])) echo '<a href="https://github.com/'.$custom['github'][0].'"><i class="fa fa-github"></i></a>';
|
||||
if (!empty($custom['public_email'])) echo '<a href="mailto:'.$custom['public_email'][0].'"><i class="fa fa-envelope"></i></a>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
the_content();
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
<?php get_sidebar(); ?>
|
||||
</section>
|
||||
|
||||
<?php echo do_shortcode( '[transport]' ); ?>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
|
|
Loading…
Reference in New Issue