• Hey
    I’m looking for the code to put in one of my pages , that will help me to put the first 9 posts in a category.

    In the end I want to put a table 3*3 that will hold the first 9 posts.
    But first of all I’ll be happy to know how to load the first 9 in a category.
    NOT THROUGH THE ADMIN PANEL,BY CODE.

    THANKX!

Viewing 1 replies (of 1 total)
  • It really depends what sort of page you’ll be using this in but you could try something like:

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'category_name' => 'Category Title',
    	'posts_per_page' => 9,
    	'paged' => $paged
    );
    query_posts($args);
    ?>

    before the Loop.

Viewing 1 replies (of 1 total)
  • The topic ‘How can I show first “X” posts in a category?’ is closed to new replies.