WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] post__not_in multiple criteria? (3 posts)

  1. jennybeaumont
    Member
    Posted 1 year ago #

    Hi folks,

    I have a secondary query on my page that is currently set up as follows:

    query_posts(array('post__not_in'=>$do_not_duplicate,'offset'=> 3));

    Now I need to exclude an individual post from this loop. I tried using post__not_in a second time, and different variations for syntax to try and give it 2 definitions - not working. Is it possible? Or does anyone know of a different way to exclude an individual post ?

    thanks!
    -jennyb

  2. alchymyth
    Forum Moderator
    Posted 1 year ago #

    try to merge the extra individual post id:

    query_posts(array('post__not_in'=>array_merge($do_not_duplicate,array($indiviual_post_id)),'offset'=> 3));
  3. jennybeaumont
    Member
    Posted 1 year ago #

    my hero! :D

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.