<?php $terms = wp_get_object_terms($post->ID, 'journal_year', array('orderby' => 'term_id', 'order' => 'ASC') ); if ( !empty( $terms ) ) : $project = array(); foreach ( $terms as $term ) { $project[] = $term->name; } echo '<span>'.$project[0].'</span>'; // echo '<h2>'.$project[1].'</h2>'; endif; ?> </h3>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter