Uso de condicional para custom post type

<?php if ( post_type_exists('custom_post_type') ): ?>

                <span><?php the_terms( $post->ID, 'nombre de la taxonomia creada', ' ', ' / ' ); ?></span>

            <h3><a href="<?php echo $link; ?>"><?php $content->title(); ?></a></h3>

 <?php elseif ( post_type_exists('custom_post_type') ): ?>

            <h3><a href="<?php echo $link; ?>"><?php $content->title(); ?></a></h3>

 <?php else: ?>

            <h3><a href="<?php echo $link; ?>"><?php $content->title(); ?></a></h3>

  <?php endif ?>

Deja un comentario