WordPress.org

Ready to get started?Download WordPress

Forums

Network Latest Posts
[resolved] Sort order (4 posts)

  1. Ronaldus
    Member
    Posted 1 year ago #

    Hi there, what a very nice plugin!!
    Just trying it out, and have some more css adjustments to do I guess.

    AND a question:
    I set the plugin to sort posts form newest to older. Works fine, until I update/adjust an older post. When saving, it leaves the date OK, but puts this post on top, as if it were the latest post.

    Can you look into this please?

    Thx for your efforts and kind regards!

    http://wordpress.org/extend/plugins/network-latest-posts/

  2. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Ronaldus, thanks for your comments. Actually that's the expected behavior, this plugin pull the last_modified date from posts. It means, each time you update a post even if it's old, it's considered recent content (for some people this is useful because if you're editing an old post it means you want to keep people up to date).

    Nonetheless, if you want to change this behavior, and pull the posts based on their creation date you may want to adjust the plugin to pull this value instead, I'll explain you how to do so:

    Open the network-latest-post.php file and look for this variable $all_posts[$post->post_modified] = $post; on line 364. Then replace it by this one: $all_posts[$post->post_date] = $post;. It should do the trick.

    Cheers.

  3. Ronaldus
    Member
    Posted 1 year ago #

    Great, Jose Luis!!
    That did the trick indeed!!

    Thx and cheers,
    Ronald

  4. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Ronald,

    Glad it's working the way you want it now. Thanks for your feedback!

    Kind regards.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic