This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Offsetting Posts

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

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

    #16825
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    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:
    [php]ORDER BY relevance DESC, " . $wpdb->posts . ".post_date DESC[/php]

    3. Change that to:
    [php]ORDER BY " . $wpdb->posts . ".post_date ASC[/php]
    ..or, if you still want relevance as primary, but date ascending you can also try:
    [php]ORDER BY relevance DESC, " . $wpdb->posts . ".post_date ASC[/php]

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

    This should very likely do the trick.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Related Posts Pro for WordPress Support’ is closed to new topics and replies.