-
Notifications
You must be signed in to change notification settings - Fork 1
/
page-blog-logistica.php
91 lines (81 loc) · 2.8 KB
/
page-blog-logistica.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
<?php
get_header('blog'); ?>
<section id="blog">
<div class="container">
<div class="row">
<div class="col-md-8 text-left">
<?php
echo do_shortcode("[metaslider id=541]");
?>
<?php
$paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1;
$i = 1;
$args = array(
'posts_per_page' => 4,
'orderby' => 'post_date',
'order' => 'DESC',
'paged' => $paged);
$query = new WP_Query( $args );
?>
<?php if ( $query->have_posts() ) : ?>
<div class="row">
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="col-md-6">
<article id="post-<?php the_ID(); ?>" class="<?php if($i < 3): echo 'linha-blog'; endif; ?>">
<header class="entry-header">
<?php if ( has_post_thumbnail() && !is_search() ) { ?>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( esc_html__( 'Permalink to %s', 'quark' ), the_title_attribute( 'echo=0' ) ) ); ?>">
<?php the_post_thumbnail('', array(
'class' => "e-cinza img-responsive",
)); ?>
</a>
<?php } ?>
<?php if ( is_single() ) { ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php }
else { ?>
<h2 class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( esc_html__( 'Permalink to %s', 'quark' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
</h2>
<?php } // is_single() ?>
</header> <!-- /.entry-header -->
<div class="entry-summary">
<?php echo get_the_twitter_excerpt(); ?>
<p class="confira">
<a href="<?php the_permalink(); ?>"><img class="e-claro" src="<?php echo dirname( get_bloginfo('stylesheet_url'))."/images/btn-plus.jpg"; ?>"/> Confira o post completo</a>
</p>
</div> <!-- /.entry-summary -->
</article> <!-- /#post -->
</div>
<?php
if($i == 2):
?>
</div><div class="row">
<?php
endif;
$i++;
?>
<?php endwhile; ?>
</div>
<div class="paginacao">
<?php
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $query->max_num_pages
) );
?>
</div>
<?php else : ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>
<?php endif; ?>
</div>
<div class="col-md-4">
<?php get_sidebar(); ?>
</div>
</div>
</div><!-- .container -->
</section>
<?php get_footer(); ?>