how to show only today's posts
-
i have several cat in my website ! in each category i m calling 4 posts, but i want call only today’s post in every cat, plz help ?
my Code is :
<?php //The Query $query = new WP_Query( 'category_name=small International News&posts_per_page=4&offset=1' ); echo '<ul>'; //The Loop while ( $query->have_posts() ) : $query->the_post(); echo '<li>'; $queried_post = get_post($cat_id); ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail(); ?></a> <h1><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1> <?php echo '</li>'; endwhile; echo '</ul>'; ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘how to show only today's posts’ is closed to new replies.