• I’ve been searching everywhere and asked a few WordPress masterminds, but everyone seemed to be stomped with this request. Hopefully you guys can help me with this.

    I would like to use the data in a custom field to query certain posts in my custom page.

    For example, in query_posts(array('category__and' => array(2,6)));

    That queries posts that are BOTH in categories 2 and 6. Is there a way to replace the 2,6 with a custom field?

    Like:
    query_posts(array('category__and' => array(CUSTOMFIELD1DATA,CUSTOMFIELD2DATA)));

    Is that doable? I need something like this due to a complex list of categories I have and I really don’t want to make 15 different custom pages.

    Please advise and thank you in advance.

    -Andre

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using Custom Fields INSIDE Query Posts command’ is closed to new replies.