Looper Provider Query String - Get Posts by post_date

I’m trying to have a page show links to other posts that were published on the same day as the page. I tried using the query builder, filtering by date. But that didn’t work for me. It just wouldn’t show anything. Then I thought I’d hard code the date into a query string, but I just can’t get it to work. This is what I tried as the query string:

category_name=link&post_status=publish&post_date=2024-08-08

When I put that as the query string, it shows the latest posts in the link category that are published. Any thoughts on how I can make it so either 1) I can hard code in the publish date, or 2) I can dynamically make it so it shows the posts that were published the same day as the page?

Hello @gavn8r,

Thanks for writing in!

Can I dynamically make it so it shows the posts that were published the same day as the page?
Yes, you can. The query string is on track with a minor addition of the dynamic content.

post_type=post&category_name=link&post_status=publish&post_date={{dc:post:publish_date}}

Kindly let us know if this works out for you.

Hi @ruenel,

Thank you so much for your reply. The query string you supplied doesn’t seem to work. Here’s the page that I’m trying to do this on:

https://gavinfish.com/newsletter/2024/08/13/gavin-fishs-crimecod-newsletter-august-13-2024-40258/

The area beneath “True Crime Headlines” should be showing the posts from August 13, but the ones that are showing up are today’s headlines.

I’ll add a secure note with login information so you can take a look-see.

Hello @gavn8r,

After several query argument combination attempts, you can make use of the date query parameters instead.
post_type=post&category_name=link&post_status=publish&year={{dc:post:publish_date format="Y"}}&monthnum={{dc:post:publish_date format="n"}}&day={{dc:post:publish_date format="j"}}

Kindly let us know how it goes.

That worked!

Thank you so much! I was going crazy trying to figure it out.

Hi @gavn8r,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.