Offsetting Posts

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #16822

    Is there a method to offset the related posts so that it publishes older posts instead of newer?

    Ernest Marcinko
    Ernest Marcinko


    Well, not without a modification to the code. The ordering always uses relevance, then date descending.

    If you want to change that, just follow these steps:

    1. Open up the wp-content\plugins\related-posts-pro\includes\related_content.class.php file on your server via FTP.

    2. Find line 577 which should be this:

    ORDER BY relevance DESC, " . $wpdb->posts . ".post_date DESC

    3. Change that to:

    ORDER BY " . $wpdb->posts . ".post_date ASC

    ..or, if you still want relevance as primary, but date ascending you can also try:

    ORDER BY relevance DESC, " . $wpdb->posts . ".post_date ASC

    4. After the change, save the plugin options, so the cache is cleared.

    This should very likely do the trick.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘Related Posts Pro for WordPress Support’ is closed to new topics and replies.