Problem with get_posts()
-
I’m using
get_posts()
function for display my most like this code snippet:<ul id="archive_posts"> <?php $i = 0; ?> <?php $myposts = get_posts('numberposts=-1&cat=-5'); foreach($myposts as $post) : ?> <?php $i++; ?> <li><a href="<?php the_permalink(); ?>" <?php if($i&1) { echo 'class="odd"';} else {echo 'class="even"';} ?>><?php the_title(); ?><span><?php the_time('d F Y H:i') ?></span></a></li> <?php endforeach; ?> </ul>
And i want to use next/previous links. But WordPress doesn’t allow to display prev/next links without loop.
However i want to use next/prev links with above codes.
Can anybody help me?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problem with get_posts()’ is closed to new replies.