WordPress.org

Ready to get started?Download WordPress

Forums

Show content for certain post type (1 post)

  1. gldtn
    Member
    Posted 3 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags