Support » Plugin: Yet Another Related Posts Plugin (YARPP) » [Plugin: Yet Another Related Posts Plugin] Want to limit related posts to posts
5 years, 3 months ago
I added an AND to the $newsql query at line 204 if class-cache.php
`$thisyear = gmdate(“Y”);
$lastyear = $thisyear-1;
$newsql =. ” and post_date >= ‘$lastyear'”;`
Should that do what I want or is it a bad idea in many ways.
It is a bad idea in many ways. 🙂
What are you trying to do? Limit it to recent posts? YARPP already has a built in feature which will let you limit the results to “recent” posts, from within a particular time range.