forked from Gnuside/wp-green-golem-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-archive.php
33 lines (28 loc) · 971 Bytes
/
content-archive.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
<?php
/* prepare content */
//$post = get_post( get_the_ID() );
/* use featured image (thumbnail) if possible
* or placeholder instead
*/
?>
<article id="post-<?php echo $post->ID; ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail( $post->ID ) ) : ?>
<a href='<?php echo post_permalink($post->ID); ?>'>
<?php echo get_the_post_thumbnail( $post->ID, 'thumbnail', array( 'class' => 'illustration' ) ); ?>
</a>
<?php endif; ?>
<!-- / article title -->
<header>
<h2 class='title'>
<a href="<?php echo post_permalink( $post->ID ); ?>"><?php the_title(); ?></a>
</h2>
<span class='category'><?php the_category(', ','single'); ?></span>
<span class='creation-date'><?php echo get_the_date(); ?></span>
<span class='author'><?php the_author_posts_link(); ?></span>
</header>
<section class='excerpt'>
<a href='<?php echo post_permalink($post->ID); ?>'>
<?php the_excerpt(); ?>
</a>
</section>
</article><!-- #post-<?php the_ID(); ?> -->