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 using panoramica theme for my WordPress website. I want to show the portfolio with category "Meet the team" along with other post category in one page. How can it be possible. Now I am able to show the post of a specific category in one page.I need to add Posrtfolio page to this. below is the code I used to show the post of a specific category in one page.

<?php
/*
 Template Name: Custom Template
*/
?>
<?php get_header();

    $recent = new WP_Query("cat=4&posts_per_page=5"); 
    while($recent->have_posts()):$recent->the_post();

     the_content(); 

    endwhile;


 get_footer();
?>
share|improve this question

1 Answer 1

To show posts from multiple categories on the same page, use

$recent = new WP_Query( 'cat=2,6,17,38&posts_per_page=5' );
share|improve this answer
    
The portfolio have no category. It have taxonomy=cpo_tax_portfolio&tag_ID=3&post_type=cpo_portfolio –  MidhuN Mar 15 '13 at 11:10
    
Sorry, that was not clear from your question. –  Marc Dingena Mar 21 '13 at 13:46

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.