Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- Template Name: frontpage
- */
- get_header();?>
- <?php
- $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
- $args = array(
- 'post_type' => 'post',
- 'posts_per_page' => 2,
- 'post_status' => 'publish',
- 'paged' => $paged
- );
- $query = new WP_Query( $args );
- ?>
- <?php while( $query->have_posts()) : $query->the_post();?>
- <?php the_post_thumbnail('single-blog-image', array('class' => 'single_blog_image')); ?>
- <?php the_title();?>
- <?php the_excerpt();?>
- <?php endwhile;?>
- <?php wp_reset_postdata(); ?>
- <?php
- echo paginate_links(array(
- 'total' => $query->max_num_pages,
- 'curent' => $paged
- ));
- ?>
- <?php
- get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement