Returns an array of the most recent posts. Simple and powerfull.
Function ns_recent_posts(10, 0, 200, false, ", ")
returns an array of objects of recent posts.
Params for function:
Use function ns_recent_posts()
in a loop.
Objects returned by array has properties, that is used in construction: $object->property, where “$object” – your variable used in a loop, but “property” can be:
<?php
foreach (ns_recent_posts(10, 0, 200, false, ", ") as $re_post){
echo <<<HTML
<div class="recent-post">
<h3><a href="{$re_post->permalink}" rel="bookmark" title="{$re_post->bookmark}>
{$re_post->post_title}
</a></h3>
<span class="post-date">{$re_post->day}.{$re_post->month}.{$re_post->year}</span>
<div class="entry">
<p>{$re_post->post_content}</p>
<span class="tags"><strong>Tags: </strong>{$re_post->post_tags}</span>
<span class="read-comments">
<a href="{$re_post->permalink}#respond">Comments ({$re_post->comment_count}) »</a>
</span>
</div>
</div>
HTML;
}
?>