Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Exit if accessed directly
- if ( !defined('ABSPATH')) exit;
- ?>
- <?php get_header(); ?>
- <?php global $more; $more = 0; ?>
- <div id="content-blog" class="grid col-620">
- <?php $options = get_option('responsive_theme_options'); ?>
- <?php if ($options['breadcrumb'] == 0): ?>
- <?php echo responsive_breadcrumb_lists(); ?>
- <?php endif; ?>
- <?php
- if ( get_query_var('paged') )
- $paged = get_query_var('paged');
- elseif ( get_query_var('page') )
- $paged = get_query_var('page');
- else
- $paged = 1;
- query_posts("post_type=post&paged=$paged");
- ?>
- <?php
- // don't edit this
- global $wp_query;
- $first_page_total= 9; // total number of posts on first page
- $paginated_total = 10;
- $found_posts = $wp_query->found_posts;
- $pages = 1 + ceil(($found_posts - $first_page_total) / $paginated_total);
- $wp_query->max_num_pages = $pages;
- // start editing
- ?>
- <?php /* Start the Loop */ ?>
- <?php if ( have_posts() ) : ?>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php get_template_part( 'content', get_post_format() ); ?>
- <?php endwhile; ?>
- <?php if(!is_paged()) : ?>
- <?php
- $sticky = get_option( 'sticky_posts' );
- $args = array(
- 'posts_per_page' => 1,
- 'post__in' => $sticky,
- 'ignore_sticky_posts' => 1
- );
- $the_query = new WP_Query( $args); ?>
- <?php /* Start the sticky post loop */ ?>
- <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
- <?php
- if ( $sticky[0] ) {
- get_template_part( 'content', get_post_format() );
- }
- ?>
- <?php endwhile; ?>
- <?php endif; ?>
- <?php if ( $wp_query->max_num_pages > 1 ) : ?>
- <div class="navigation">
- <div class="previous"><?php next_posts_link( __( '‹ Older posts', 'responsive' ) ); ?></div>
- <div class="next"><?php previous_posts_link( __( 'Newer posts ›', 'responsive' ) ); ?></div>
- </div><!-- end of .navigation -->
- <?php endif; ?>
- <?php else : ?>
- <h1 class="title-404"><?php _e('404 — Fancy meeting you here!', 'responsive'); ?></h1>
- <p><?php _e('Don't panic, we'll get through this together. Let's explore our options here.', 'responsive'); ?></p>
- <h6><?php printf( __('You can return %s or search for the page you were looking for.', 'responsive'),
- sprintf( '<a href="%1$s" title="%2$s">%3$s</a>',
- esc_url( get_home_url() ),
- esc_attr__('Home', 'responsive'),
- esc_attr__('← Home', 'responsive')
- ));
- ?></h6>
- <?php get_search_form(); ?>
- <?php endif; ?>
- </div><!-- end of #content-blog -->
- <?php get_sidebar(); ?>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement