WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[Plugin: Yet Another Related Posts Plugin] Want to limit related posts to posts (2 posts)

  1. abqjournal
    Member
    Posted 2 years 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.
    thanks

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic