Looper: show recent post from a specific post category

hello @ruenel,

great. i was managed to solve this. thank you very much.

post_type=post&category_name=event&posts_per_page=20&meta_key=start_datum&orderby=meta_value&order=ASC&meta_query%5B0%5D%5Bkey%5D=start_datum&meta_query%5B0%5D%5Bvalue%5D={{dc:global:date format=“Ymd”}}&meta_query%5B0%5D%5Bcompare%5D=%3E%3D&order=ASC

the very last thing i need to know is:
i want to display in a seperate page only all the old events. how can i reach this?

thanks
oli

Hi Oli,

Glad that we are able to help you. To get the older posts, you can add the similar Query String with the specific date and compare it with the less than clause. Or you can use the between in comparison to getting the posts between specific two dates. I would suggest you go through the following article on the meta queries using the compare.

https://rudrastyh.com/wordpress/meta_query.html
https://diveinwp.com/meta_query-to-compare-between-dates-in-wordpress/

Hope it helps.
Thanks

1 Like

thank you @tristup. i will have a look into the urls…

Hi Oli,

You are most welcome. Hope the links will help you.

Thanks

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