WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Stop Post Duplication on homepage with 3 loops (8 posts)

  1. pixelcreme
    Member
    Posted 4 years ago #

    Basically, there is 3 loops on the homepage of this blog I am trying to code for a client. I ran into a little problem and need it fixed ASAP. It wouldn't be a problem but the documentation really isn't as easy to use as I had hoped for this one. I have WP coding down pretty well, just one little issue.

    The first loop is displaying 3 posts from the category Featured. The next loop will display 5 more posts, from any category, but not duplicating any posts from the first loop. The last loop displays 4 more posts from any category but also not duplicating any posts from the previous loops.

    That is what I need done. Currently it keeps duplicating the posts and no matter how I change the loops or querys, it won't work.

    If someone could help me out, I would be most grateful! Thanks.

    Regards,
    Jared

  2. pixelcreme
    Member
    Posted 4 years ago #

    Also here's the link to the page I'm currently working on:
    http://pixelcreme.com/StretchMarks/

  3. pixelcreme
    Member
    Posted 3 years ago #

    ...Anybody?

  4. Mark / t31os
    Moderator
    Posted 3 years ago #

    Could you provide a copy of your loop code so i can see what you have so far..

    I only need to see the lines of code that include..

    query_posts( ...etc..

    or

    new WP_Query( ...etc..

    If you intend to post anything over 15 - 20 lines of code please use a pastebin and provide a link back here.

    Thanks.. :)

  5. pixelcreme
    Member
    Posted 3 years ago #

    Hey,

    Here's the link:
    http://wordpress.pastebin.com/DhXxgUN9

    Thanks!

  6. Mark / t31os
    Moderator
    Posted 3 years ago #

    Give this a try, and report back if any errors (it's untested - should be fine though).
    http://wordpress.pastebin.com/x2JHbWB9

    Hope that helps... :)

  7. pixelcreme
    Member
    Posted 3 years ago #

    It works!

    Thanks so much for your help.

  8. pixelcreme
    Member
    Posted 3 years ago #

    Actually, if you check the link I posted earlier, the last loop is not displaying any posts. Can you help again? Thanks.

    --Scratch that, got it working, thanks again!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.