theme - 4
add the taxonomy info, in content-recipes.php:
<?php //if ( 'post' == get_post_type() ) : ?>
1 <div class="entry-meta-custom"> 2 <div>Meal type: <?php echo get_the_term_list( $post->ID, 'meal-type', '', ', ', '' ); ?></div> 3 <div>Servings: <?php echo get_the_term_list( $post->ID, 'servings', '', ', ', '' ); ?></div> 4 <div>Difficulty: <?php echo get_the_term_list( $post->ID, 'difficulty', '', ', ', '' ); ?></div> 5 <div>Ingredients: <?php echo get_the_term_list( $post->ID, 'ingredients', '', ', ', '' ); ?></div> 6 </div><!-- .entry-meta-custom -->
In style.css:
1 .entry-meta-custom { 2 color: #666; 3 clear: both; 4 font-size: 12px; 5 line-height: 18px; 6 }
get_the_term_list():
get_the_term_list( $post->ID, 'meal-type', 'beforeitem', 'seperate ', 'afteritem' )
example:
get_the_term_list( $post->ID, 'meal-type', '<li>', '</li><li> ', '<li>' )
浙公网安备 33010602011771号