WordPress.org

Ready to get started?Download WordPress

Forums

Excluding posts already shown (4 posts)

  1. marcgent@me.com
    Member
    Posted 3 years ago #

    I an using a wordpress theme called Wp Genius and have made lots of mods to create what I was looking for but now I am stuck.

    On the main index page we have a featured items banner and sub sections, below that there are category boxes that display all posts in that category. I am trying to hide the posts that are already shown in the featured sections but to no avail.

    I just keep getting syntax errors, Any help is much appreciated

    the code for the category boxes is:

    [Mod Note: Code segment removed. If you want to post large blocks of code, please use a pastebin (Alternate URL).]

  2. marcgent@me.com
    Member
    Posted 3 years ago #

  3. MichaelH
    Member
    Posted 3 years ago #

    You've already got example of that -- each of your loops looks to be adding the post ids to a $do_not_duplicate array and in one place you have if ( $post->ID == $do_not_duplicate[$post->ID] ) continue; so you just need to use that code in other loops where you want to skip posts.

  4. marcgent@me.com
    Member
    Posted 3 years ago #

    thanks for your reply, I have tried to include that but now no post show up.

Topic Closed

This topic has been closed to new replies.

About this Topic