Querying custom posts and regular posts

You’re nearly there, you just need to tell WP that you want to query posts as well as your Press CPT.

So:

query_posts( array( 'post_type' => array('posts', 'portfolio'), ...);

where portfolio is the name of your custom post type.

The relevant Codex page

[Update]

So this is how the query should look

<?php

  $args = array('post_type'=>array('posts', 'portfolio'));

  query_posts($args);

  if ( have_posts() ) : while ( have_posts() ) : the_post();

?>

Leave a Comment