- This topic has 1 reply, 2 voices, and was last updated 10 years, 8 months ago by .
Viewing 2 posts – 1 through 2 (of 2 total)
Viewing 2 posts – 1 through 2 (of 2 total)
Posted
by
Forums › Forums › Search & Filter Pro › Trailing show posts for last 12 months
we have a huge amount of historical blog posts of a site and only want to show the posts for the last (trailing) 12 months on the front end. Any ideas on how to achieve this?
Ideally all the posts would be searchable by SFP but only the last 12 months show on the ‘archive’ page….
Any help gratefully received.
Hi Jennifer
There is no such option to do that in the plugin, but you can use this filter to modify the S&F query arguments:
You can add args to modify the date here just as you would in the WP_Query:
https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters
Thanks