• Hi

    I’m trying to list posts cross-referenced both by client and project type. At this point, it’s only returning the values for the current post. I’m guessing I need to use wp_query, but I’ve tried that and it doesn’t work. I’d also like to exclude the current post from the lists once they’re populated. Code at the mo is as follows:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Appreciate your help.

Viewing 1 replies (of 1 total)
  • First, I think your first query_posts() is interfering with the second. Put a call to wp_reset_query(); just after each endwhile;.

    Second, to not show posts from the first loop in the second, save the post ID’s in an array and exclude those posts from the second loop. The code should be similar to this:

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 1 replies (of 1 total)
  • The topic ‘listing posts via custom field’ is closed to new replies.