WordPress.org

Ready to get started?Download WordPress

Forums

Templates and Category's... (2 posts)

  1. adamgatenby
    Member
    Posted 7 years ago #

    Iv read quite a bit of the docs on here, and tried many things, however still not getting anywhere.

    So here goes

    Is there a way to have a page display posts from a certain category only.
    EG.

    <?php
     $myposts = get_posts('numberposts=5&offset=1&category=12');
     foreach($myposts as $post) :
     ?>

    So for example, posts categorised in to #12 would appear only.

    Thanks in advanced :-) Please help!

  2. MichaelH
    Member
    Posted 7 years ago #

    Category Templates may point you to an 'easier' solution.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags