Top

Working-Together on "Recent post pull code doesn’t bring formatting…"

April 3, 2010 by  

Hi, I am using the below code to pull the excerpt of the most recent post in my News category into a column on my front page. It does that, but I noticed in the “excerpt” part it doesn’t pull in the formatting. For example if there were two short paragraphs, it will lump all the text into 1 paragraph. Also, if the was a hyperlink, it won’t pull that over, it will just look like plain text.

Can someone please point me in the right direction to where I can learn how to make this work. Thanks.

<?php if(have_posts()) : ?>
           <?php query_posts('category_name=News&showposts=1'); ?>
            <?php while(have_posts()) : the_post(); ?>
       <h3><?php the_title(); ?></h3>
<?php the_excerpt(); ?>
<a href="<?php the_permalink(); ?>" title="Read the rest of <?php the_title(); ?>" class="permalink">Learn More ></a>
 <?php endwhile; ?>
            <?php endif; ?>
Share

Comments

Facebook comments:

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





*
Bottom