145 posts
  • Has been part of the Envato Community for over 2 years
  • Located in Austria
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
LovelessDesign says

Hello,

For example I’m on mysite.com/2013/04/20 where it displays all the posts of that day. I want to have a navigation (you can switch between the archive days).

BUT if 2013/04/21 doesn’t exist, it should jump to 2013/04/22.

I usually use this code: <?php get_day_link(‘year’, ‘month’, ‘day’); ?>

Is there a way to automatically get the next day where posts exist?

502 posts Premium Website Design
  • Has referred 50+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+2 more
SpyroPress says

Hello,

For example I’m on mysite.com/2013/04/20 where it displays all the posts of that day. I want to have a navigation (you can switch between the archive days).

BUT if 2013/04/21 doesn’t exist, it should jump to 2013/04/22.

I usually use this code: <?php get_day_link(‘year’, ‘month’, ‘day’); ?>

Is there a way to automatically get the next day where posts exist?

If you need the functionality we can develop this for you. Contact us

Thanks -S

145 posts
  • Has been part of the Envato Community for over 2 years
  • Located in Austria
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
LovelessDesign says

Hm, is it that complicated? the navigation already works. I just need a tip how to jump over days that doesn’t exist.

502 posts Premium Website Design
  • Has referred 50+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+2 more
SpyroPress says

Hm, is it that complicated? the navigation already works. I just need a tip how to jump over days that doesn’t exist.

Kind of complicated…

3266 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says


Hm, is it that complicated? the navigation already works. I just need a tip how to jump over days that doesn’t exist.
Kind of complicated…

not at all complicated….

https://codex.wordpress.org/Function_Reference/WP_Query#Time_Parameters

query your posts with the time parameters then use the default pagination

by
by
by
by
by
by