-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·50 lines (37 loc) · 1.75 KB
/
index.php
File metadata and controls
executable file
·50 lines (37 loc) · 1.75 KB
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
<?php get_header(); ?>
<main role="main" class="blogArchives">
<div class="container">
<h1><?php _e( 'Latest Posts', '' ); ?></h1>
<!-- section -->
<section>
<div class="row small-up-1 medium-up-3 large-up-4" data-equalizer data-equalize-by-row="true">
<?php
$args = array( 'posts_per_page' => 12, 'category' => 'Featured', );
$lastposts = get_posts( $args );
foreach ( $lastposts as $post ) :
setup_postdata( $post ); ?>
<div class="column">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> data-equalizer-watch>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php if ( has_post_thumbnail()) : // Check if thumbnail exists ?>
<?php the_post_thumbnail('homeArticle'); // Declare pixel size you need inside the array ?>
<?php endif; ?>
<div class="textBox">
<h2>
<?php the_title(); ?>
</h2>
<p><?php the_excerpt('custom_excerpt_length'); ?></p>
<a class="readMore" href="<?php the_permalink(); ?>"><p>Read More</p></a>
</div>
</a>
</article>
</div>
<?php endforeach; wp_reset_postdata(); ?>
</div>
<?php get_template_part('pagination'); ?>
</section>
<!-- /section -->
</div>
<div class="clear"></div>
</main>
<?php get_footer(); ?>