Skip to content

Instantly share code, notes, and snippets.

@jlengstorf
Created July 26, 2010 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlengstorf/490865 to your computer and use it in GitHub Desktop.
Save jlengstorf/490865 to your computer and use it in GitHub Desktop.
<?php
$args = array(
'post_type' => 'post',
'numberposts' => -1,
'post_status' => null,
'cat' => 4
);
$everything = get_posts($args);
if ($everything):
echo '<ul>';
$counter = 0;
foreach ($everything as $thing):
setup_postdata($thing);
if( ($counter % 3) == 0 && $counter > 0 ):
?>
</ul>
<ul>
<?php endif; ?>
<li>
<?php echo "<pre>", print_r($thing, TRUE), "</pre>"; ?>
<!-- Skip this output while testing
<a href="<?php the_permalink() ?>"><?php echo $thing->post_title; ?></a>
<p class="date"><?php the_time('m/j/y'); ?></p>
<?php echo $thing->post_excerpt; ?><a class="more" href="<?php the_permalink() ?>">more»</a>
-->
</li>
<?php
$counter++;
endforeach;
endif;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment