I want to apply a rule to my site that filters out all blog posts that are over 2 years old.
I see some solutions that involve manually putting posts into a category and hiding the category but I want a solution that is fully automated.
Is there a way to tell WP that whenever you grab posts to apply this rule:
if( !is_admin() ) {
select posts where post date > two-years-ago-today
}
Thanks