WordPress.org

Ready to get started?Download WordPress

Forums

Simple Code Help needed (2 posts)

  1. Klark0
    Member
    Posted 5 years ago #

    I'm trying to display all entries posted on the current day from one particular category only.

    Here's what I've found. What do I need to add so that it only shows posts from the cat=id that i specify ? Thanks.

    <ul>
    <?php $today = getdate(); query_posts ('year=' .$today["year"] .'&monthnum=' .$today["mon"] .'&day=' .$today["mday"] ); ?>
    
      <?php while (have_posts()) : the_post(); ?>
    <li>
        <!-- STUFF HERE -->
    </li>
    
      <?php endwhile;?>
    </ul>
  2. CD30
    Member
    Posted 5 years ago #

    query_posts($query_string . 'category_name=Shows&year=' .$today["year"] .'&monthnum=' .$today["mon"] .'&day=' .$today["mday"] );

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.