I need help to properly script this echo php script that displays recent articles from wordpress on static homepage. It's doing weird things.
First, it spits out the actual permalink
Secondly, after the permalink it spits out the Title but it disregards all the <h1>/<h4> tag styling, and the title is not a link, which it should be.
It displays the content correctly, but the title incorrectly. Because it should display a clickagle title with <h1>/<h4> styles rendered and the permalink is the actual link for the Title.
Please help.
<?php
$recent = new WP_Query("cat=1&showposts=6");
$i = 0;
while($recent->have_posts()) : $recent->the_post();
if($i == 0){
echo '<h1><a href="';
the_permalink();
echo '" rel="bookmark">'.the_title().'</a></h1>';
if (function_exists('the_content_limit')){
the_content_limit(195, "<span class='read-more'>Read more »</span>");
}
}else{
echo '<h4><a href="';
the_permalink();
echo '" rel="bookmark">'.the_title().'</a></h4>';
the_content_limit(130, "");
echo '<div class="hppostmeta">';
echo '<p>'.the_time('F j, Y').' | <a href="';
the_permalink();
echo '" rel="bookmark">Read the story »</a></p>';
echo '</div>';
}
echo '<div style="clear:both;"></div>';
$i++;
endwhile; ?>