Need help? Check out our Support site, then


Adding latest post info for a specific category

  1. Im using the following code to display the latest post in an area on my site

    <h4 class="inside-header">">Latest News <span class="inside-header-quiet small">View All</span></h4>
    <div class="title-overlay"><h4>" rel="bookmark" title="Permanent Link to <?php the_title_attribute($cat=5); ?>"><?php the_title() ?></h4>
    <?php the_excerpt(); ?>
    <p class="postmetadata"><?php the_time('M d, Y') ?> | <?php comments_popup_link('Have your say »', '1 Comment »', '% Comments »'); ?></p>

    problem is it displays the lates post in the category that corresponds to the category on screen, so if I am looking at category 1 it displays the latest post in category 1.

    Is there any way to make it always display the title and excerpt from the latest post in category 5?

    thanks very much in advance!

  2. That code is not for a wordpress.com blog. You need to ask your question at http://wordpress.org/support

  3. I know... I've just found that out. I'm new to all this.....

    Sorry!

  4. I know... I've just found that out. I'm new to all this.....

    Sorry!

Topic Closed

This topic has been closed to new replies.

About this Topic