WordPress.org

Ready to get started?Download WordPress

Forums

Network Latest Posts
[resolved] Some results are being omitted (4 posts)

  1. bryan1fm
    Member
    Posted 1 year ago #

    I've created a multisite with about 80 dummy sites with posts and pages. This will, if approved, replace our current intranet version which has about 1000 student blogs. I've tested several plugins for listing posts from across the networks and yours is the closest to what I need.

    However, not all of the required posts are being listed. I've edited selected posts across the network to make sure I know exactly which results should be return. The 2 shortcodes I've used (on separate pages) are:
    [nlposts title="Network posts" number_posts=1 title_only=false auto_excerpt=true excerpt_length=20 category='ict1' full_meta=true paginate=true posts_per_page=5] 17 results instead of 22.
    [nlposts title="Network posts" number_posts=1 title_only=false auto_excerpt=true excerpt_length=20 category='ict2' full_meta=true paginate=true posts_per_page=5] 13 results instead of 14.

    For the second set, I edited 1 post at a time with the new category and title and checked the results. At 13 posts, your plugin returned 13 results, but at 14, it still returned 13. The pagination is simply to make the results easier to count and would not be used on a live site.

    The network is currently protected, but I can turn this off if you need to view the results or I can give you one of the dummy users if you need to get to the back end.

    It's quite possible I've done something silly, but I can't see where.

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

  2. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Bryan,

    Well, there's a difference between number_posts and posts_per_page parameters, if you want to pull ALL your posts within the category ict1 but only display 1 per page, you must set posts_per_page=1 and not set number_posts look below:

    [nlposts title="Network posts" title_only=false auto_excerpt=true excerpt_length=20 category=ict1 full_meta=true paginate=true posts_per_page=1]

    That will pull all your posts with the category ict1 and display 1 post per page.

    Now if you want to display 5 per page, just keep the posts_per_page value to 5. The important thing is if you want NLPosts to pull all posts you must ignore the number_posts parameter, because that one limits the number of posts it will pull from each blog.

    Try changing your shortcodes by the ones below:

    [nlposts title="Network posts" title_only=false auto_excerpt=true excerpt_length=20 category=ict1 full_meta=true paginate=true posts_per_page=5]

    [nlposts title="Network posts" title_only=false auto_excerpt=true excerpt_length=20 category=ict2 full_meta=true paginate=true posts_per_page=5]

    And please let me know if it works.

  3. bryan1fm
    Member
    Posted 1 year ago #

    Hello Jose

    When I was looking for a suitable plugin, I was impressed with how many support queries were marked as resolved and the speed of response.

    Well, your solution worked for me, but I'm rather puzzled as to why. You see, each of the posts was on a different blog, so the shortcode could only have pulled one from each blog anyway. The pagination was just to make testing easier.

    Students will enter their learning objectives on their blogs and the teacher can use your plugin to check they have all been entered correctly. Some classes will have 2 lessons in one day, so it would be useful to be able to pull only 1 from each blog. For the other classes, I can restrict them those published in the last day.

    Your solution and quick response have made me feel confident about being able to make a presentation to the teachers and to use it on a live website. Thank you and I shall mark this as resolved.

  4. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Bryan,

    Thanks for your comments and feedback, I've been on the other side of the fence and I understand how frustrating it can be when you're waiting for a response to make a decision and never receiving one.

    I don't know why that happens, actually I did a test on my site, you can see it here: Network Lab Test and it works as expected, this is the shortcode I used:

    [nlposts title="Network posts" number_posts=1 category=wordpress title_only=false auto_excerpt=true excerpt_length=20 full_meta=true paginate=true posts_per_page=3]

    I don't know if it's because I'm testing only with 4 sites (my network is not as big as yours), but it works, it pulls only one post (the newest) within the category wordpress from each blog.

    Anyway, I'm a bit busy right now but as soon as I have some time to make proper testing cases I'll take a look at this again.

    At least I'm glad you got it working even if it's not exactly the way you wanted.

    Cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic