Forum Replies Created

Viewing 1 replies (of 1 total)
  • Forum: Fixing WordPress
    In reply to: 5 previous posts

    To anyone who views this. Hope this helps.

    1] This will go on your index.php in your theme folder, most likely anyways.

    The php before you start the WP loop:
    <?php query_posts("cat=1&year=$current_year&monthnum=$current_month&order=DESC&showposts=10"); ?>

    Change the values as you please. This will display the 10 most recent post in category 1 for the current month & year in descending order. So most recent will be at the top.

    2] Then you need to throw in the WP loop:
    <?php while (have_posts()) : the_post(); ?>

    3] Then you need to tell WP how to display the information:
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>

    This will list all 10 most recent posts each with a permalink to their respective posts.

    4] Close the loop:
    <?php endwhile; ?>

    Thats it. Hope that helps anyone ??

Viewing 1 replies (of 1 total)