• basketball

    (@basketball)


    I am just wondering if anyone has any ideas how I can get a certain number of posts (just the title/linked) on a page. I have exec-php running and normally it lets me run php code, but the following code returns nothing:

    http://wordpress.org/support/topic/91775?replies=8

    <?php $posts = get_posts('numberposts=10&order=DESC&orderby=post_date&category=18'); foreach ($posts as $post) : start_wp(); ?>
    <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
    <?php endforeach; ?>

    Which works fine outside the loop (say in the sidebar). I was thinking of:

    http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/

    But I only want it from 2-3 specific categories. So yeah, just wondering if anyone had any thoughts on how I could get it working?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘10 Posts from Category X in a Page’ is closed to new replies.