Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 134580

kurdt_the_goat on "Limit number of terms output by get_the_term_list"

$
0
0

Hi,

I have a site with many custom taxonomies.
On the homepage, i just want to show 3 of the terms for a post instead of all of them, to avoid cluttering the listing.

I have this code for getting terms from all of my taxonomies displaying:

echo get_the_term_list( $post->ID, array('franchise', 'publisher', 'developer', 'platform'), 'All Terms: ', ', ', '' );

Is there a way to limit the output to just 3 terms?

Thanks in advance!


Viewing all articles
Browse latest Browse all 134580

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>