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 am calling content type portfolio in a page but i want to show some pages by id with portfolio content type, below code only retrieve the portfolio posts.

     $args = array( 'post_type' => 'portfolio', 'include' => '73,71' , 
    'posts_per_page' => 30, 'order' => 'ASC', 'paged' => get_query_var('paged'));
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();

Note: include Id 73,71 content types are 'page'

share|improve this question

1 Answer 1

try adding page like this on post type 'post_type' => array( 'portfolio', 'page' )

post_type can accept array... more of it here... http://codex.wordpress.org/Class_Reference/WP_Query#Type_Parameters

share|improve this answer
    
i've already try but its also return more pages like contact-us, about-us that i don't want, i just call pages by id of 73,71. –  Rameez SOOMRO Jan 30 '13 at 8:47

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.