Custom taxonomies: inserting the word “and”
-
I have a simple question:
Within this code that I use to get a term list
<?php if (get_the_term_list( $post->ID, 'country' ) != null ) { ?> <div>Country: <?php echo get_the_term_list( $post->ID, 'country', '', ', ', '' ); ?></div><?php } ?>
how can I incorporate the word “and” before the last term of the query?For example, instead of returning “Germany, England, France” for country, I want it to return “Germany, England, and France.”
How do I do this? Thanks!
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Custom taxonomies: inserting the word “and”’ is closed to new replies.