WordPress.org

Ready to get started?Download WordPress

Forums

Query & Pagination (2 posts)

  1. cambridge15
    Member
    Posted 11 months ago #

    Hi there, I'm using a wp query to call posts from the Home category to the home.php page. I've searched these forums top and bottom and have seem similar issues but haven't had any lucky troubleshooting it for myself.

    This is the code I'm using

    <div id="home-posts">
    		<div class="home-posts-title"><i class="icon-menu"></i> latest music updates, offers & scene info</div>
    
         	<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("category_name=home&paged=$paged&showposts=17"); ?>
            <?php if (have_posts()) : ?>
            <?php while (have_posts()) : the_post(); ?>  
    
    		<div class="home-post"><a href="<?php the_permalink(); ?>" class="transition">
    				<div class="home-image"><?php the_post_thumbnail('home-thumb', array('class' => 'home-image')); ?></div>
    				<?php the_titlesmall('', '<i class="icon-right-open-mini"></i>', true, '90') ?></a>
    					<div class="home-post-meta">
    						<i class="icon-user" style="font-size:7px; color:#9B362F"></i> <?php the_author_posts_link( array('class' => 'home-author')); ?>
    						<i class="icon-clock" style="font-size:7px; color:#9B362F"></i> &nbsp;  <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?>
    						<i class="icon-comments" style="font-size:7px; color:#9B362F"></i> <?php comments_number('0 Comments', '1 Comments', '% Comments' );?></div>
    			</div>
    
    		<?php endwhile; endif; ?>
    
    		<?php previous_posts_link('« Newer Entries', 0) ?>
    		<?php next_posts_link('Older Entries »', 0); ?>
    
    	</div>

    I can't get pagination to work for the life of me!!

    Thank you in advanced for any insight.

  2. keesiemeijer
    moderator
    Posted 11 months ago #

Reply

You must log in to post.

About this Topic