WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the code from here to split my loop up in to columns. The columns work. I have 7 posts in the databese and showposts set to 6. I cannot get nextpage link to show? I have a $paged variable in my $args array I have set number of posts per page to 5 in admin/reading. Full loop below. Many thanks in advance.

$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'showposts' => 6,
'&paged=' => $paged,
'tax_query' => array(
    array( 'taxonomy' => 'post_format',
        'field' => 'slug',
        'terms' => array('post-format-audio')

$the_query = new WP_Query($args);?>
<?php foreach(new WP_Query_Columns($the_query, 3) as $column_count) : ?>
    <ul class="sc-track-list fourteen columns alpha">
        <?php while ($column_count--) : $the_query->the_post(); ?>
        <li class="sc-track">
            <div class="sc-player">
                     <h1 class="entry-title"><a href="<?php echo get_post_meta($post->ID, '_format_audio_embed' , true); ?>"></a></h1><!--title-->
        <div class="meta"> 
            <span class="entry-date"><?php echo get_the_date(); ?></span> 
            <a class="spch-bub-inside" href="<?php comments_link(); ?>">
                <span class="point"></span>  
                <em><?php comments_number('0', '1', '%'); ?></em>
            <span class="entry-tag"><?php the_tags(' '); ?></span>                 

            <script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
           <a href="http://twitter.com/share" class="twitter-share-button"
              data-url="<?php the_permalink(); ?>"
              data-text="<?php the_title(); ?>"


        <?php endwhile; ?>


<?php endforeach; ?>

<div class="navigation">
<div class="alignleft"><?php previous_posts_link('&laquo; Previous Entries') ?></div>
<div class="alignright"><?php next_posts_link('&laquo; Older Entries') ?>

share|improve this question

You're not using the Loop. You should also use get_posts instead.

share|improve this answer
Hi thanks for your advice. I'm using foreach as apposed to the loop. – James Jan 28 '12 at 13:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.