1

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

single-[customposttype].php 

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>
<div class="content-details">   
    <h1><?php the_title(); ?></h1>
    <?php the_content(); ?>
</div>

Thanks in advance :)

1 Answer 1

5

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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