Hi there!
I have added custom post meta to WPSP using code that was published by Tom in this forum (see here)
Today, I realised I also wanted to show terms from a custom taxonomy (including links). Building on Tom’s sample, I made this:
// Add custom meta to WPSHowPosts
function wpsp_add_custom_meta()
{
$first_meta = get_the_terms( get_the_ID(), 'custom_taxonomy_name', true );
$second_meta = get_post_meta( get_the_ID(), 'custom_meta_key', true );
if ( isset($first_meta) && !empty($first_meta) )
foreach ( $first_meta as $term ) {
$term_link = get_term_link( $term );
echo '<span class="entry-terms"><a href="' . esc_url( $term_link ) . '">' . $term->name . '</a></span> ';
}
if ( isset($second_meta) && !empty($second_meta) )
echo $second_meta;
}
add_action( 'wpsp_after_content','wpsp_add_custom_meta' );
I thought other people might benefit from this as well…
Cheers!
Sander