-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-experiencias.php
78 lines (64 loc) · 1.98 KB
/
page-experiencias.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
<?php
/**
* Template Name: experiencias
*
* @package Odin
* @since 2.2.0
*/
get_header(''); ?>
<?php $odin_exp_opts = get_option( 'odin_exp' );?>
<main id="content" class="pagina-itens <?php echo odin_classes_page_full(); ?>" tabindex="-1" role="main">
<div class="row" id="ajax-itens">
<?php
// $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
$args = array(
'post_type' => 'experiencia',
'paged'=> $paged,
'posts_per_page' =>8
);
$WP_Query_exp = new WP_Query( $args );
if( $WP_Query_exp->have_posts() )
{
while ( $WP_Query_exp->have_posts() )
{
$WP_Query_exp->the_post();
?>
<?php get_template_part('content','todos');
}
?>
<div class="clearfix"></div>
<div class="row pagination">
<?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' => $WP_Query_exp->max_num_pages
) );
?>
</div>
<div class="clearfix"></div>
<br>
</div> <!-- id="escolad" -->
<?php
}
wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly
?>
<div class="row conte-sua">
<div class="img-conte sem-margem col-sm-4">
<img class="" src="<?php echo get_template_directory_uri(); ?>/assets/images/img-conte.png">
</div>
<div class="col-sm-4 link-conte">
<h2><?php echo $odin_exp_opts['destaque_exp_pre_tit'];?></h2>
<p><?php echo $odin_exp_opts['destaque_exp_pre'];?></p>
<a href="http://escolastransformadoras.com.br/contato/">
<img class="botao-conte" src="<?php echo get_template_directory_uri(); ?>/assets/images/botao-conte.png">
</a>
</div>
<div class="col-sm-4 boneco-conte">
<img class="" src="<?php echo get_template_directory_uri(); ?>/assets/images/boneco-conte.png">
</div>
</div>
</main>
<?php get_footer();