Title: Current date posts
Last modified: August 19, 2016

---

# Current date posts

 *  [dimigra](https://wordpress.org/support/users/dimigra/)
 * (@dimigra)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/current-date-posts/)
 * Hi everybody,
 * anybody can help me to solve this problem ?
 * I’m trying to display on my front page two kind of posts:
 * – the post of the current date “Today’s events” ( first loop )
 * – the post of the current week “This week events”( second loop )
 * [http://www.ziguline.it](http://www.ziguline.it)
 * Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [dimigra](https://wordpress.org/support/users/dimigra/)
 * (@dimigra)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/current-date-posts/#post-664709)
 * I forgot to say tha I’m using a 2.3 version of WP and I’veinstalled a plug-in
   to show future date posts.
 *  Thread Starter [dimigra](https://wordpress.org/support/users/dimigra/)
 * (@dimigra)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/current-date-posts/#post-664753)
 * I can even pay for a professional support.
 * Thanks
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/current-date-posts/#post-664764)
 * Each of your loop requests require a bit of custom querying, but the first is
   fairly easy:
 * [http://wordpress.org/support/topic/98090#post-488635](http://wordpress.org/support/topic/98090#post-488635)
 * The second would be more complicated, but first we need a little defining. Does“
   current week” mean _this week_, or the last seven days. They are not always the
   same time period.
 *  Thread Starter [dimigra](https://wordpress.org/support/users/dimigra/)
 * (@dimigra)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/current-date-posts/#post-664769)
 * Thank you for you kind support, i’ll try to be more clear.
 * – First Loop = show the next 24 hours events (posts)
 * If there are no events go to next 24 hours and so on…
 * – Second Loop = show next 7 days events (posts)
 * Thank you again for the attention.
 * Ciao!
 *  Thread Starter [dimigra](https://wordpress.org/support/users/dimigra/)
 * (@dimigra)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/current-date-posts/#post-664770)
 * At the moment I’m using this solution:
 * <?php if ( have_posts() ) { while ( have_posts() ) : the_post(); ?>
 * <?php $mylimit=60*60*24; //secondi * minuti * ore [* giorni]
    if ((get_the_time(‘
   U’) < (current_time(timestamp) – (get_settings(‘gmt_offset’) * 3600) + $mylimit))&&(
   get_the_time(‘U’) > current_time(timestamp)) ) {?>
 * Now I don’t know how to place a second loop that show “next 7 days events” ( 
   posts )
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/current-date-posts/#post-664772)
 * I don’t know what you’re using to display future posts (and what it may react
   to), but you can try using `rewind_posts()` after “Today’s events” to reset the
   loop so you can run through it again.
 *  Thread Starter [dimigra](https://wordpress.org/support/users/dimigra/)
 * (@dimigra)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/current-date-posts/#post-664775)
 * I don’t know what you’re using to display future posts (and what it may react
   to)
 * I’m using “the future is now” plug-in to show future post.
 * I’ll try your suggestion.
 * Thanks
 *  [tripailao](https://wordpress.org/support/users/tripailao/)
 * (@tripailao)
 * [18 years ago](https://wordpress.org/support/topic/current-date-posts/#post-664861)
 * Someone could do the second loop?. If they could help me, would be very thanked.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Current date posts’ is closed to new replies.

## Tags

 * [current day](https://wordpress.org/support/topic-tag/current-day/)
 * [events](https://wordpress.org/support/topic-tag/events/)
 * [multiple loops](https://wordpress.org/support/topic-tag/multiple-loops/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 8 replies
 * 3 participants
 * Last reply from: [tripailao](https://wordpress.org/support/users/tripailao/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/current-date-posts/#post-664861)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
