WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Get latest post titles from one category (3 posts)

  1. s0what
    Member
    Posted 4 years ago #

    Hi! I use Arthemia theme and it uses following code to display latest post titles from one category:

    <?php $recent = new WP_Query("cat=3&showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
    
    <li><a href="<?php the_permalink(); ?>" rel="bookmark">
    <?php the_title(); ?></a></li>
    
    <?php endwhile; ?>

    but it doesn't work on WP 3.0 beta 1

  2. MichaelH
    Member
    Posted 4 years ago #

    Works fine for me when I put that in the twentyten theme's index.php

  3. s0what
    Member
    Posted 4 years ago #

    I found that it doesn't work, because category 3 doesn't exist anymore.
    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.