WordPress.org

Forums

Related Posts Thumbnails
Order by date? (2 posts)

  1. chabotjeff
    Member
    Posted 2 years ago #

    I love this plugin but it shows posts from years ago, which aren't exactly relevant any more. Is there any way to customize the plug-in's code to order by most recent post? Just like how WP orders posts?

    http://wordpress.org/extend/plugins/related-posts-thumbnails/

  2. alertaroja
    Member
    Posted 1 year ago #

    found and replace in related-posts-thumbnails.php:

    $order = " ORDER BY RAND() LIMIT " . $posts_number;

    replace by:

    $order = " ORDER BY post_date DESC LIMIT " . $posts_number;

    That's all.

    Ernesto Bustos
    http://alertaroja.net/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic