• Looking to have a static page that displays posts that were published on the same day.

    For example if today was Oct 21, 2016, the page would display previous posts that were published on Oct 21 in past years.

    The next day the page would display posts that were published on Oct 22 in previous years.

    Not sure how to make this happen but hoping there is a solution available.

    Thanks for considering this request or offering suggestions!

Viewing 2 replies - 1 through 2 (of 2 total)
  • this should do it.

    $args = array(
    	'monthnum'=> date('m'),
    	'day'=> date('d'),
    );
    
    $day_posts = new WP_Query($args);

    However, if you want to use the client-side dates, then you will have to use javascript to get the current date.

    Also to display them on the front page or any other page, you will have to make a custom page template.

    https://developer.wordpress.org/themes/template-files-section/page-template-files/page-templates/

    • This reply was modified 9 years, 7 months ago by Patrick.
    • This reply was modified 9 years, 7 months ago by Patrick.
    Thread Starter Brent Shea

    (@brshea)

    Wow, thanks wppatrickk!

    The perfect solution would be to include the client-side dates. Sorry to ask but does anyone have a solution for this too? I am willing to pay for a complete solution.

    Thanks, again!

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

The topic ‘Posts on this Day’ is closed to new replies.