• 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)
  • 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.