Created
July 26, 2010 17:19
-
-
Save jlengstorf/490865 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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