Support » Fixing WordPress » Link to yesterdays and todays posts

Viewing 2 replies - 1 through 2 (of 2 total)
  • Today’s:

    <a href="<?php echo get_day_link(); ?>">Today's posts</a>

    Yesterday’s:

    <?php $yesterday = strtotime( '-1 days' ); ?>
    <a href="<?php echo get_day_link( date( 'Y', $yesterday ), date( 'm', $yesterday ), date( 'd', $yesterday ) ); ?>">Yesterday's posts</a>

    Thread Starter flabrea

    (@flabrea)

    Thanks for your help! Yesterdays link results in an error?!

    …archive/date/2016/08/%3Cbr%20/%3E%3Cb%3EWarning%3C/b%3E:%20%20Missing%20argument%201%20for%20get_day_link(),%20called%20in%20/…

    Any idea?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Link to yesterdays and todays posts’ is closed to new replies.