I want post tags to be limited to 3

Viewing 2 posts - 1 through 2 (of 2 total)

  • Author
    Posts
  • #4203
    author-photoIvan
    Guest

    Hello there I am using your theme (awesome one!) and I am adjusting it to my needs. The problem I have is that I want post tags to be limited to 3. Here is the code I am using in main-functions.php:

    // tags —->
    $tags_list = get_the_tags();
    $count=0;
    $test= ‘term_id).'”>’.$tag->name.’ ‘;
    if ($tags_list) {
    foreach($tags_list as $tag) {
    $count++;
    printf( ‘%1$s %2$s’,
    _x( ‘Tags’, ‘Used before tag names.’, ‘wordstar’ ),
    ‘term_id).'”>’.$tag->name.’ ‘
    );
    if( $count >2 ) break;
    }
    }

    Sadly after the new update if a user is logged out the bar with the tags looks like this:

    View post on imgur.com

    If they are logged it looks normal like this:

    Problems 😀

    #4213
    author-photoLinesh Jose
    Keymaster

    Hi,

    Thank for using my theme :). I checked your site and I couldn’t find any issues.

Viewing 2 posts - 1 through 2 (of 2 total)
The topic ‘I want post tags to be limited to 3’ is closed to new replies.