Hey I got it! It shows up correctly now. My concern now is trying to set up a stable structure so that when there are no hosts listed, the text does not show (like it would for tags). Here is my entire function, how is the best way to structure this?
/* translators: used between list items, there is a space after the comma */
$category_list = get_the_category_list( __( ', ', 'sela' ) );
/* translators: used between list items, there is a space after the comma */
$tag_list = get_the_tag_list( '', ', ' );
/* translators: used between list items, there is a space after the comma */
$host_list = get_the_term_list( $post->ID, 'host', '', ', ', '');
if ( ! sela_categorized_blog() ) {
// This blog only has 1 category so we just need to worry about tags in the meta text
if ( '' != $tag_list && ! is_wp_error( $tag_list ) ) {
$meta_text = '<span class="tags-links">' . esc_html__( 'Tagged: %2$s', 'sela' ) . '</span>';
} else {
$meta_text = __( '<a href="%4$s" title="Permalink to %5$s" rel="bookmark">Permalink</a>.', 'sela' );
}
} else {
// But this blog has loads of categories so we should probably display them here
if ( '' != $tag_list && ! is_wp_error( $tag_list ) ) {
$meta_text = '<span class="cat-links">' . esc_html__( 'Posted in: %1$s', 'sela' ) . '</span><span class="sep"> | </span><span class="tags-links">' . esc_html__( 'Tagged: %2$s', 'sela' ) . '</span><span class="sep"> | </span><span class="hosts-links">' . esc_html__( 'Featuring: %3$s', 'sela');
} else {
$meta_text = '<span class="cat-links">' . esc_html__( 'Posted in: %1$s', 'sela' ) . '</span>';
}
} // end check for categories on this blog
// If $tag_list contains WP Error, empty before passing to printf()
if ( is_wp_error( $tag_list ) ) {
$tag_list = '';
}
printf(
$meta_text,
$category_list,
$tag_list,
$host_list,
esc_url( get_permalink() ),
the_title_attribute( 'echo=0' )
);
}
endif;