Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: SEO-up
- */
- ?>
- <?php get_header();?>
- <main class="page__content offset-it" style="padding-top: 169px;">
- <div class="bg-white">
- <div class="box box--top box--bottom">
- <div class="info-wrap">
- <?php
- global $posts;
- $posts = new WP_Query( array(
- 'posts_per_page' => 2,
- 'paged' => get_query_var('paged') ?: 1,
- 'cat' => 3,
- ));
- $save_wpq = $posts;
- while ( $posts->have_posts() ) {
- $posts->the_post();
- $content = '<a class="info-card js-anim visible">
- <div class="info-card-img">'.get_the_post_thumbnail($post->ID, 'medium').'</div>
- <div class="title-h3 info-card-title">'.get_the_title().'</div>
- </a>
- ';
- echo $content;
- }
- $args = array(
- 'base' => '%_%',
- 'format' => '?page=%#%',
- 'total' => 1,
- 'current' => 0,
- 'show_all' => False,
- 'end_size' => 1,
- 'mid_size' => 2,
- 'prev_next' => True,
- 'prev_text' => __('« Previous'),
- 'next_text' => __('Next »'),
- 'type' => 'plain',
- 'add_args' => False,
- 'add_fragment' => '',
- 'before_page_number' => '',
- 'after_page_number' => ''
- );
- echo paginate_links( $args );
- wp_reset_postdata();
- $posts = $save_wpq;
- ?>
- </div>
- </div>
- </div>
- </main>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement