-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
76 lines (66 loc) · 2.61 KB
/
index.php
File metadata and controls
76 lines (66 loc) · 2.61 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/*
|--------------------------------------------------------------------------
| Wordpress theme > index.php
|--------------------------------------------------------------------------
*/
# header
get_header();
?>
<main class="main">
<div class="container">
<div class="row">
<section class="col-md-8 content">
<?php
# listando os ultimos posts
while (have_posts()) :
the_post();
?>
<article class="post post-excerpt">
<h3 class="post-title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
<a href="<?php the_permalink() ?>">
<?php
if (has_post_thumbnail()) :
the_post_thumbnail(array(800, 600));
endif;
?>
</a>
<div class="post-content">
<?php
/* the excerpt */
the_excerpt();
?>
</div><!-- .post-content -->
<div class="post-meta">
<div class="post-meta-left">
<p class="post-meta-item">Postado em: <?php the_time('d/m/Y') ?></p>
<p class="post-meta-item">Por: <?php the_author() ?></p>
</div><!-- .col-md-6 -->
<div class="post-meta-right">
<a href="<?php the_permalink() ?>" class="btn btn-lg btn-primary">Continue lendo...</a><!-- .btn -->
</div><!-- .col-md-6 -->
</div><!-- .post-meta -->
</article><!-- .post -->
<?php
endwhile;
if (! have_posts()) :
?>
<article class="post">
<br>
<h3 class="post-title text-center">Nenhum post encontrado</h3>
</article><!-- .post -->
<?php
endif;
# paginação
require_once('pagination.php');
?>
</section><!-- .content -->
<aside class="col-md-4 sidebar">
<?php get_sidebar() ?>
</aside><!-- .sidebar -->
</div><!-- .row -->
</div><!-- .container -->
</main><!-- .main -->
<?php
# footer
get_footer();