-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
52 lines (46 loc) · 1.57 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php get_template_part('templates/page', 'header'); ?>
<?php if (!have_posts()) : ?>
<div class="alert alert-warning">
<?php _e('Sorry, no results were found.', 'sage'); ?>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<?php
$args = array( 'post_type' => array( 'post', 'press' ));
$loop = new WP_Query( $args );
?>
<?php while ($loop->have_posts() ) : $loop->the_post(); ?>
<article>
<header>
<?php if ( 'press' == get_post_type() ) : ?>
<h4 class="headline">
<a href="<?php $key_1_value = get_post_meta( get_the_ID(), 'link', true );
if( ! empty( $key_1_value ) ) { echo $key_1_value; } ?>"><?php the_title(); ?>
</a>
</h4>
<?php endif; ?>
<?php if ( 'press' != get_post_type() ) : ?>
<h4 class="headline"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
<?php endif; ?>
</header>
<div class="media-left hidden-xs">
<a class="frontpagepostpic" href="<?php the_permalink(); ?>">
<?php the_post_thumbnail() ?>
</a>
</div>
<div class="media-body small">
<?php if( !post_type_exists( array('evaluations', 'press') ) ){ ?>
<?php get_template_part('templates/entry-meta'); ?>
<?php }?>
<?php if( post_type_exists( 'posts' ) ){ ?>
<?php $mykey_values = get_post_custom_values( 'date' );
foreach ( $mykey_values as $value ) {
echo $value;
} ?>
<?php }?>
<?php the_excerpt(); ?>
</div>
</article>
<hr/>
<?php endwhile; ?>
<?php the_posts_navigation(); ?>