Skip to:
Content
Pages
Categories
Search
Top
Bottom

Tag length

  • @janismo

    Participant

    hi,

    does any one know some way to limit length of posts tags?
    found code below to limit number of tags, maybe it can be updated/changed?

    thanks!!

    `<?php
    $posttags = get_the_tags();
    $count=0;
    if ($posttags) {
    foreach($posttags as $tag) {
    $count++;
    echo ‘term_id).'”>’.$tag->name.’ ‘;
    if( $count >4 ) break;
    }
    }

    ?>`

  • The topic ‘Tag length’ is closed to new replies.
Skip to toolbar