forked from andersnoren/koji
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preview.php
35 lines (22 loc) · 867 Bytes
/
preview.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
<article <?php post_class( 'preview preview-' . get_post_type() . ' do-spot' ); ?> id="post-<?php the_ID(); ?>">
<div class="preview-wrapper">
<?php if ( ( has_post_thumbnail() && ! post_password_required() ) || koji_get_fallback_image_url() ) : ?>
<a href="<?php the_permalink(); ?>" class="preview-image">
<?php
if ( has_post_thumbnail() && ! post_password_required() ) {
$image_size = koji_get_preview_image_size();
the_post_thumbnail( $image_size );
} else {
koji_the_fallback_image();
}
?>
</a>
<?php endif; ?>
<div class="preview-inner">
<h2 class="preview-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php
// Output the post meta
koji_the_post_meta( $post->ID, 'preview' ); ?>
</div><!-- .preview-inner -->
</div><!-- .preview-wrapper -->
</article>