Previous | Next pages showing same information as 1st page
-
I’m using a normal page in the same way as an index.php page template and attached a custom template called blog.php. This seems to be working brilliantly apart from my ‘Next Page | Previous Page’ buttons are showing the same three posts as original page when clicked on.
This is massively annoying and I’ve been trying to figure it out for ages.
And the blog.php template code:
<?php /* Template Name: Blog */ ?> <?php get_header();?> <div id="wrap" class="container_12"> <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?> <div id="main-container" class="grid_8"> <?php query_posts('category_name=blog'); if(have_posts()):?><?php while(have_posts()):the_post();?> <div class="post"> <div class="post-title"><a href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></a></div><!--post-title--> <!--timthumb with jQuery Pretty Photo--> <?php if ( get_post_meta($post->ID, 'image', true) ) { ?> <a href="<?php the_permalink()?>" title="<?php the_title()?>"> <img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, 'image', $single = true); ?>&h=150&w=100&zc=0&q=100" class="tim-thumbs3" /> </a> <?php } ?> <div class="post-content"> <?php the_excerpt();?> </div> </div><!--post--> <a href="<?php the_permalink()?>" class="continue">Continue...</a> <?php edit_post_link('Edit This','<div class="edit-me-links">','</div>');?> <?php endwhile;?> <?php endif;?> <div class="post-navigation"><?php posts_nav_link();?></div><!--post-navigation--> </div><!--main-container--> <?php get_sidebar();?> </div><!--wrap--> <?php get_footer();?>
Any help will be greatly appreciated. Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Previous | Next pages showing same information as 1st page’ is closed to new replies.