Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
1  
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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.