WordPress.org

Ready to get started?Download WordPress

Forums

Network Latest Posts
[resolved] Order by blog ID (6 posts)

  1. Chris
    Member
    Posted 1 year ago #

    I’d like to order the recent posts not by date but by the ID of the blogs they are from. Is that possible?

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

  2. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hello moargh,

    Well it wasn't possible, but... Why not?... I just pushed version 3.3 which includes a new parameter order_by_blog when set to true it will order posts by blog ID, you can set sorting_order to asc (by default) or desc. Hope it suits your needs.

    Cheers.

  3. Chris
    Member
    Posted 1 year ago #

    Wow, thank you very much for the fast solution—works like a charm!

    Just another short question:
    Is it also possible to define a custom sort order by blog ID like [nlposts sort_by_blog=true blog_id_order=2, 1, 3] or by blog name like [nlposts sort_by_blog=true blog_name_order=NameOfBlog2, NameOfBlog1, NameOfBlog3] which results in

    1. Blog ID 2
    2. Blog ID 1
    3. Blog ID 3

    ?

  4. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    Well that's a more difficult approach, besides that for really big networks it won't work unless you specify all ids.

    What I'm wondering is why you just don't simply use blog_id and pull information by blogs? Wouldn't it be easier if you just set

    [nlposts blog_id=2]
    [nlposts blog_id=1]
    [nlposts blog_id=3]

    Then you just use some CSS styling?

  5. Chris
    Member
    Posted 1 year ago #

    Thanks again for the fast reply!

    Your suggestion would be a good alternative—I didn’t think about that before. Thank you very much!

  6. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    I'm glad to be helpful, if you have more questions or want some hints on how to accomplish something don't hesitate to ask.

    Cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags