Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
- $args = array(
- 'post_type' => 'post',
- 'posts_per_page' => '10',
- 'paged' => $paged,
- );
- $wp_query = new WP_Query($args);
- ?>
- <?php while ($wp_query -> have_posts()) : $wp_query -> the_post(); ?>
- <div id="title">
- <li>
- <a href="<?php the_permalink() ?>" class="title">
- <?php the_title(); ?>
- </a>
- <div id="sub-title">
- <div id="date-post">
- <img src="<?php bloginfo('template_directory'); ?>/img/date-icon.png" class="date-img" />
- <p><?php echo get_the_date(); ?></p>
- </div><!---Fim date-post--->
- <div id="tag-post">
- <img src="<?php bloginfo('template_directory'); ?>/img/tag-icon.png" class="tag-img"/>
- <p><?php the_tags('',', ',''); ?></p>
- </div><!---Fim tag-post--->
- </div><!---Fim sub-title--->
- </li>
- </div>
- <div id="thumbnail">
- <?php the_post_thumbnail();?>
- </div>
- <div id="thumbnail-bg">
- <div id="thumbnail-reflect">
- </div>
- </div>
- <?php the_excerpt(); ?>
- <div id="readmore">
- <a href="<?php the_permalink() ?>" class="readmore">Continue Lendo</a>
- </div>
- <div id="readmore-bg">
- </div>
- <div id="break-line">
- </div>
- <?php endwhile;?>
- <?php
- global $wp_query;
- $big = 999999999; // need an unlikely integer
- $translated = __( 'Page', 'mytextdomain' ); // Supply translatable string
- 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->max_num_pages,
- 'prev_text' => __('«'),
- 'next_text' => __('»'),
- ));
- ?>
- <?php wp_reset_postdata(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement