Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

<?php 
$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>
        <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>
            </a>                               
            <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-via="jillowen"
              data-text="<?php the_title(); ?>"
              data-count="horizontal">Tweet</a>
              </div>

        </li>


        <?php endwhile; ?>


    </ul>



<?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') ?>
</div>


</div>
share|improve this question
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.