Title: Custom Post Type Output
Last modified: August 20, 2016

---

# Custom Post Type Output

 *  [kayyy](https://wordpress.org/support/users/kayyy/)
 * (@kayyy)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-output/)
 * i`ve a little problem.
    i set up a custom post type with the name =”portfolio”.
   in my template-portfolio.php i`ve the following code
 *     ```
       <?php $loop = new WP_Query(array(
       			   'post-type' => 'portfolio',
       			   'showposts' => 10,
       			)); ?>
       			<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
   
       							<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
   
       								<div class="entry-content">
       									<?php the_content(); ?>
       								</div><!-- .entry-content -->
       							</div><!-- #post-## -->
   
       			<?php endwhile; ?>
       ```
   
 * but i get only the standard wordpress text, not the text from my custom post 
   type. did i anything wrong?

Viewing 1 replies (of 1 total)

 *  [Peter Hardy-vanDoorn](https://wordpress.org/support/users/petervandoorn/)
 * (@petervandoorn)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-output/#post-2156321)
 * You’ve mis-typed `post_type`. It should have an underscore rather than a hyphen.
   Also, the last item in an array shouldn’t have a comma at the end.
 * Hope that helps
 * Peter

Viewing 1 replies (of 1 total)

The topic ‘Custom Post Type Output’ is closed to new replies.

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)

 * 1 reply
 * 2 participants
 * Last reply from: [Peter Hardy-vanDoorn](https://wordpress.org/support/users/petervandoorn/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-output/#post-2156321)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
