How to display the latest 5 posts (2 posts)

  1. aleks77
    Posted 3 years ago #

    Hi, I am not an expert in PHP, and I have a code which displays only an excerpt of the latest post. I am looking to change this in changing it to display the latest 5 posts. I hope someone can help me with the code. Thanks in advance.

    The original code is the following:

    [please mark any code using the 'code' button or backticks as described in the forum guidelines for posting code - the code below is already partially corrupted]

    <div class="clearfloat">
    	<h3 class="cat_title"><?php the_category(', '); ?> »</h3>
    	<h2 class="title"><a>" rel="bookmark"><?php the_title(); ?></a></h2>
        <?php colabs_post_meta(); ?>
    		$width = get_option ( "colabs_thumbWidth_LatestPost" );
    		$height = get_option ( "colabs_thumbHeight_LatestPost" );
    		if ( $width == 0 ) { $width = 150; }
    		if ( $height == 0 ) { $height = 150; }
    	<?php the_excerpt(__('Read the full story »','colabsthemes')); ?> <a>" rel="bookmark">Read the full story »</a>
  2. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    please post the full code of the template;

    best use the pastebin - see http://codex.wordpress.org/Forum_Welcome#Posting_Code

Topic Closed

This topic has been closed to new replies.

About this Topic