• I created a post type “event”, so in the single.php page I added the following;

    <?php the_content(); ?>
    
    <div class="event_flyer"><?php the_post_thumbnail();?></div>
    
                                  <ul class="event_detail">
                                  	<li>When: <span><?php meta('date'); ?></span></li>
                                  	<li>Time: <span><?php meta('time'); ?></span></li>
                                  	<li>Where: <span><?php meta('venue'); ?></span></li>
                                  	<li>Address: <span><?php meta('address'); ?></span></li>
                                  	<li>Age Requirements: <span><?php meta('age'); ?></span></li>
                                  	<li>Proper Dressing: <span><?php meta('dresscode'); ?></span></li>
                                  	<li><?php meta('moreinfo'); ?></li>
                                  </ul>

    Which my markup shows up, but now it shows up to every post type. How can I make it show up only for event post type?

    Thanks!

  • The topic ‘Show content for certain post type’ is closed to new replies.