Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <section id="primary" class="full-width">
- <div id="content" role="main" class="container_12" >
- <div id="archive-itms" class="container_12" >
- <?php
- global $wp_query;
- $first_page_total= 5; // total number of posts on first page
- $paginated_total = 20;
- $found_posts = $wp_query->found_posts;
- $pages = 1 + ceil(($found_posts - $first_page_total) / $paginated_total);
- $wp_query->max_num_pages = $pages;
- ?>
- <?php /* Start the Loop */ ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php if ( $paged < 2 ) : ?>
- <?php if( $wp_query->current_post == 0 && !is_paged() ) : ?>
- <div id="latest-news-block" class="container_12" >
- <div class="grid_8">
- <a href="<?php the_permalink() ?>"><?php the_post_thumbnail('large-img'); ?></a>
- </div>
- <div class="grid_4">
- <div class="latest-news-copy">
- <p class="date"><?php the_time('j F Y') ?></p>
- <h2 class="title"><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h2>
- <a class="more" href="<?php the_permalink() ?>"><?php _e( 'Read more …', 'toolbox' ); ?></a>
- </div>
- </div>
- <div class="clearboth"></div>
- </div>
- <?php else : ?>
- <div class="news-block grid_3">
- <a href="<?php the_permalink() ?>"><?php the_post_thumbnail('xmedium-img'); ?></a>
- <p class="date"><?php the_time('j F Y') ?></p>
- <h2 class="title"><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h2>
- <a class="more" href="<?php the_permalink() ?>"><?php _e( 'Read more …', 'toolbox' ); ?></a>
- </div>
- <?php endif; ?>
- <?php else : ?>
- <div class="news-block grid_3">
- <a href="<?php the_permalink() ?>"><?php the_post_thumbnail('xmedium-img'); ?></a>
- <p class="date"><?php the_time('j F Y') ?></p>
- <h2 class="title"><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h2>
- <a class="more" href="<?php the_permalink() ?>"><?php _e( 'Read more', 'toolbox' ); ?></a>
- </div>
- <?php endif; ?>
- <?php endwhile; ?>
- <div class="clearboth"></div>
- </div>
- <?php /* Display navigation to next/previous pages when applicable */ ?>
- <?php if ( $wp_query->max_num_pages > 1 ) : ?>
- <nav id="nav-below">
- <?php wp_pagenavi(); ?>
- </nav><!-- #nav-below -->
- <?php endif; ?>
- </div><!-- #content -->
- </section><!-- #primary -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement