WordPress.org

Ready to get started?Download WordPress

Forums

Network Latest Posts
[resolved] How to show 1 post only from special blogs? (3 posts)

  1. csigncsign
    Member
    Posted 2 years ago #

    Hi,

    I would like to use the shortcode within a page in my main blog, to show 1 post of only 3 special blogs (actually I have more blogs in the network, but want to show only from 3!).

    How can I do this?
    And: I haven't understand, what "instance identifier" is for and what to add there.

    I haven't found any answer for this in the FAQ nor on your website, that gave an alert that it has been hacked :-(

    Thanks for any tip.

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

  2. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 2 years ago #

    Hi CS,

    Thanks for your message, I'm solving the issue with the intrusion. In order to display 1 post from each of your special blogs, you just have to set the number_posts parameter to 1, then to pull the posts from the 3 special blogs, you must use the blog_id parameter to pass the 3 blog ids.

    Regarding your question about the instance identifier, it's used to make each shortcode unique, so if you use the pagination function (it uses ajax to load the posts) it won't change the pages for all the shortcodes used but the one we clicked on.

    Examples:

    [nlposts number_posts=1 blog_id=1,2,3] << in this example it'll pull 1 post from the blogs 1, 2 and 3

    [nlposts number_posts=10 paginate=true posts_per_page=5 category=music instance=music]
    [nlposts number_posts=10 paginate=true posts_per_page=5 category=movies instance=movies]

    << in this example it will pull 10 posts under the categories music and 10 under the category movies, as we're paginating results and both of them will be on the same page, the instance name will help to identify each block of results. So when you click on page 2 for the music category it'll load the page number 2 for the music posts but not for the movies. I hope this makes sense, once I get the site back online I'll post some examples.

    Please let me know if it helps.

  3. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 2 years ago #

    Hello again,

    My site is back online, please check: L'Elite Network Test Lab for more details and examples.

    Cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic