Limit Tags to 3 per Post

Last updated 11 months ago

PHP
//* Limit tags to three per post...
add_filter( 'term_links-post_tag', 'hlabs_limit_post_tags' );
function hlabs_limit_post_tags( $terms ) {

    return array_slice( $terms, 0, 3, true );
}

All code snippets are licensed GPLv2 or later unless otherwise stated.