I have looked and looked and tried to find an answer for what I've been looking for, but I have yet to see an answer for this:
I am trying to generate a Wordpress loop that takes all the posts from a single category and displays them three at a time inside <li></li>
tags.
Output should look like this:
<li>My post title | Another Title | Third title</li>
<li>The next post title | A different post | Post #6</li>
<li>And so on | And so forth</li>
I need this to loop through all the entries in the category until finished, and then exit the loop.
My code is completely non-working at this point, but I've provided what I'm working with below. If anyone has any solution to this, I'd love to give mad props to you, as this has hounded me for three days without any solution so far.
<?php // Loop through posts three at a time
$recoffsetinit = '0';
$recoffset = '3';
query_posts('cat=1&showposts=0');
$post = get_posts('category=1&numberposts=3&offset='.$recoffsetinit.');
while (have_posts()) : the_post();
?>
<li>
<?php
$postslist = get_posts('cat=1&order=ASC&orderby=title');
foreach ($postslist as $post) : setup_postdata($post);
static $count = 0; if ($count == "3") { break; } else { ?>
<a href="<?php the_permalink() ?>"></a>
<?php $count++; } ?>
<?php endforeach; ?>
<?php $recoffsetinit = $recoffset + $recoffsetinit; ?>
</li>
<?php endwhile; ?>