Recent Topics

Recent Articles

Started by on Feb 09, 2005 – Contents updated: Feb 09, 2005

Feb 09, 2005 23:36    

I am trying to get the latest (recent) article subjects (with link) to appear at the bottom of every page. I am using the summary.php code to retrieve the data; however, I get an error when doing so. I am assuming it is because I am using the summary.php code.

To be specific, I am using this code:

<?php // --------------------------- BLOG LIST -----------------------------
for( $blog=blog_list_start('stub');
$blog!=false;
$blog=blog_list_next('stub') )
{ # by uncommenting the following lines you can hide some blogs
// if( $blog == 1 ) continue; // Hide blog 1...
?>
<h3><a href="<?php blog_list_iteminfo('blogurl', 'raw' ) ?>" title="<?php blog_list_iteminfo( 'shortdesc', 'htmlattr'); ?>" class="linklist"><?php blog_list_iteminfo( 'name', 'htmlbody'); ?></a></h3>
<ul>
<?php // Get the 3 last posts for each blog:
$BlogBList = & new ItemList( $blog, '', '', '', '', '', array(), '', 'DESC', '', '', '', '', '', '', '', '', '', '3', 'posts' );

while( $Item = $BlogBList->get_item() )
{
?>

<P><?php $Item->issue_date() ?>:
<?php $Item->title( '', '', false ); ?>
<span class="small">[<a href="<?php $Item->permalink() ?>" title="<?php echo T_('Permanent link to full entry') ?>" class="linklist">Read More</a>]</span></P>
</li>

Any suggestions would be wonderful!

Feb 10, 2005 23:45

Yeah, this was really the code I was looking for:

<?php
$BlogBList = new ItemList( $blog, '', '', '', '', '', array(), '', 'DESC', '', '', '', '', '', '', '', '', '', '5', 'posts' );
while( $BlogBList->get_item() )
{
?>
<li lang="<?php the_lang() ?>">
<a href="<?php permalink_link() ?>" title="<?php echo T_('Permanent link to full entry') ?>"><?php the_title( '', '', false ); ?></a>
</li>
<?php
}
?>


Form is loading...

Community CMS – This forum is powered by b2evolution CMS, a complete engine for your website.