-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
99 lines (87 loc) · 2.75 KB
/
index.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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Go_Country_Theme
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="blog" role="main">
<div class="header-cover" style="background-image: url('/~gots/wp-content/uploads/blog.jpg');">
<article class="container">
<section class="blog-title">
<h1>Blog</h1>
<h2>Novidades do Reino Unido</h2>
</section>
</article>
<div class="container">
<?php if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('<p class="breadcrumbs" id="breadcrumbs">','</p>');
} ?>
</div>
</div>
<div class="blog-container container">
<div class="blog-posts">
<?php
if ( have_posts() ) : ?>
<?php
$i = 0;
/* Start the Loop */
while ( have_posts() ) : the_post();
if ($i == 0) { ?>
<div class="row">
<?php } ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php the_permalink(); ?>">
<div class="post-container">
<div class="post-date">
<div class="post-date-day"><?php echo get_the_date('d');?></div>
<div class="post-date-month"><?php echo get_the_date('M');?></div>
</div>
<div class="post-image" style="background-image: url('<?php the_post_thumbnail_url(); ?>');"></div>
<div class="post-text">
<header class="entry-header">
<div class="post-title">
<h2><?php the_title(); ?></h2>
<h3><?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?></h3>
</div>
</header>
<div class="entry-excerpt">
<?php the_excerpt(); ?>
</div>
<a href="<?php the_permalink(); ?>"><div class="post-button">Saiba Mais</div></a>
</div>
</div>
</a>
</article><!-- #post-## -->
<?php if ($i == 1) { ?>
</div>
<?php
$i = -1;
}
$i++;
endwhile;
if(function_exists('wp_paginate')):
wp_paginate();
else :
the_posts_navigation();
endif;
else :
get_template_part( 'template-parts/content', 'none' );
endif; ?>
</div>
<div class="blog-sidebar">
<?php get_sidebar(); ?>
</div>
</div>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();