Forums › Forums › Search & Filter Pro › Removing old posts from search
- This topic has 4 replies, 2 voices, and was last updated 10 years, 7 months ago by
Anonymous.
-
Anonymous(Private) March 16, 2016 at 9:36 am #39510
Hi Ross,
hope you’re doing well.As usual your plugin is kicking ass no issues with it. Also now making a new horizontal layout.
My question: we have an event post type that is included in our search. I would like (just for the events type) the search plugin not to show results (posts) older than the current date.
There’s a bit of code you can advise me to use for this?
thanks
Ross Moderator(Private) March 16, 2016 at 3:12 pm #39545Hey again ๐
You can edit the query yourself here:
So you could restrict the date range as per the wordpress docs:
https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters
Thanks
Ross Moderator(Private) March 17, 2016 at 10:11 am #39653Ah yes, you can add the code to functions.php in your theme like most WP filters ๐ So of course you are free to update the plugin!
Best
-
AuthorPosts