-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblog.php
More file actions
61 lines (42 loc) · 1.14 KB
/
blog.php
File metadata and controls
61 lines (42 loc) · 1.14 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
51
52
53
54
55
56
57
58
59
60
61
<?php
/*
Template Name: Blog
*/
?>
<?php get_header(); ?>
<div class="blog-background">
<div class="post-card blog-content">
<div class="float-70">
<?php
$query = 'posts_per_page=10';
$queryObject = new WP_Query($query);
// The Loop...
if ($queryObject->have_posts()) {
while ($queryObject->have_posts()) {
$queryObject->the_post(); ?>
<div class="single-blogpost">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<div class="timestamp">
By <span class="author"><?php the_field('blog_author'); ?></span><span class="time"> <?php the_date(); ?></span>
</div>
<div class="post-thumbnail" style="background: url(<?php the_post_thumbnail_url(); ?>) no-repeat center center; background-size: cover;"></div>
<?php the_excerpt() ?>
<a class="learnmore" href="<?php the_permalink(); ?>">Continue Reading > ></a>
</div>
<?php
}
}
?>
</div>
<div class="sidebar">
<!--
<ul>
<?php wp_list_categories( array(
'orderby' => 'name'
) ); ?>
</ul>
-->
</div>
</div>
</div>
<?php get_footer(); ?>