145 posts
  • Austria
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 1-2 years
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?

454 posts Premium Website Design
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
  • Has been a member for 1-2 years
  • Exclusive Author
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
  • Austria
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 1-2 years
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.

454 posts Premium Website Design
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Referred between 10 and 49 users
  • Bought between 10 and 49 items
  • Has been a member for 1-2 years
  • Exclusive Author
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…

3114 posts
  • Sold between 5 000 and 10 000 dollars
  • United States
  • Bought between 10 and 49 items
  • Has been a member for 3-4 years
  • Exclusive Author
chrisakelley 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