WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using this query WP_Query('post_type=product&posts_per_page=8') I need to include a specific page into the query but not sure how to add it since I'm only specifying the custom post type? Is it possible to add in a page?

share|improve this question
You need to make 2 queries. – Wyck Jan 25 '13 at 22:20
@Wyck I created a second query which works fine, but isn't there a way to combine this into one and maybe use a do while loop? – Anagio Jan 25 '13 at 23:29
You can query 'post_type' => array( 'product', 'page') but then you have to separate the returned data, often it's just easy to do a second query. – Wyck Jan 26 '13 at 0:00
@Wyck I had tried that and used page_id=123 but that didn't seem to filter the pages while leaving the product posts alone. – Anagio Jan 26 '13 at 3:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.