0

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'

0

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

  • 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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