-
Notifications
You must be signed in to change notification settings - Fork 0
/
loop.php
executable file
·38 lines (30 loc) · 1.13 KB
/
loop.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
<div class="row">
<?php if ( have_posts() ) : ?>
<?php while( have_posts() ) : the_post() ?>
<!-- article -->
<article class="medium-6 columns" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- post title -->
<h2>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</h2>
<!-- /post title -->
<!-- post thumbnail -->
<?php if ( has_post_thumbnail()) : // Check if thumbnail exists ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail(array(400,400)); // Declare pixel size you need inside the array ?>
</a>
<?php endif; ?>
<!-- /post thumbnail -->
<p><?php echo wp_trim_words( get_the_content(), 60, '...' ); ?> <a class="readMore" href="<?php the_permalink(); ?>">Read More</a></p>
<br class="clear" />
</article>
<!-- /article -->
<?php endwhile; ?>
<?php else: ?>
<!-- article -->
<article>
<h2><?php _e( 'Sorry, nothing to display.', '' ); ?></h2>
</article>
<!-- /article -->
<?php endif; ?>
</div>