WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a WordPress custom post-type setup. I've created


However instead of displaying only the requested custom-post-type it goes to the URL, then displays all of the posts in the custom-type.

Here's a copy of the code i'm currently using:

<?php query_posts("post_type=shorts"); while (have_posts()) : the_post(); ?>

<div class="header-promo">
    <?php echo get_post_meta($post->ID, "mo_short_embed", true); ?>
<div class="content-details">   
    <h1><?php the_title(); ?></h1>
    <?php the_content(); ?>

Thanks in advance :)

share|improve this question
up vote 5 down vote accepted

Just remove query_posts("post_type=shorts"); from your code.

share|improve this answer
Awesome, thanks! – George Wiscombe Oct 18 '10 at 10:19
You are welcome! – sorich87 Oct 18 '10 at 10:26

Your Answer


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.