Support » Themes and Templates » Pagination on custom post template

  • Okay so I created a template for my blog page so that it only shows certain posts of a certain category. My problem is that when I click on the “older posts/ New Posts” links, it doesn’t do anything. I am still new to php so please let me know what I need to do to fix that in my code. Sorry if this isn’t the correct category either.

    <?php /*
    Template Name: blogTemplate
    */ ?>
    
    <?php get_header(); ?>
    
    <div id="content">
    	<div id="main">
    
    		<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    		<?php the_content(); ?>
    		<?php endwhile; else: endif; ?>
    
    		<?php query_posts('category_name=Blog&showposts=5'.get_the_title().'&post_status=publish,future');?>
    		<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
    		<p><?php the_content(); ?>
    
    		<?php endwhile;
    			twentytwelve_content_nav( 'nav-below' );
    		 else: endif; ?>
    
    	</div>
    </div>
    <?php get_footer(); ?>
  • The topic ‘Pagination on custom post template’ is closed to new replies.