2012-07-11, 00:49:46
hello!
How to display intro of content in Sidebar?
i modify function nm_list_recent() to display date, but can't get content
How to display intro of content in Sidebar?
i modify function nm_list_recent() to display date, but can't get content
Code:
function nm_list_recent() {
global $NMRECENTPOSTS;
$posts = nm_get_posts();
if (!empty($posts)) {
echo ' ';
$posts = array_slice($posts, 0, $NMRECENTPOSTS, true);
foreach ($posts as $post) {
$url = nm_get_url('post') . $post->slug;
$title = strip_tags(strip_decode($post->title));
$postDate = date('d.m.Y', strtotime($post->date));
echo "<p><span class='news_date'>$postDate</span></p>
<p><div class='news_title_colon'><a href=\"$url\">$title</a></div></p><br />";
}
echo ' ';
}
}