Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #170383

    Hi!

    1.
    I have a lot of Tags for each single post. Is it possible to show only 3 of them (randomly if possible) instead of all??? This will be awesome!

    2.
    I removed all with the following code in Quick.css – Is this Code ok? i removed the delimiter, because i do not know what it is and it takes a lot of free space from the and of the post to the top of the footer…. or any better solution?

    .blog-tags {
    display: none;
    }

    .post_delimiter {
    display: none;
    }

    Thank you for your great support

    #171534

    Hello chooseone!

    1) Open up /wp-content/themes/enfold/includes/loop-index.php and replace

    
                    the_tags('<strong>'.__('Tags:','avia_framework').'</strong><span> ');
    

    with

    
    $posttags = get_the_tags();
    $count=0;
    $tagoutput = '';
    
    if ($posttags) 
    {
    $tagoutput = '<strong>'.__('Tags:','avia_framework').'</strong><span> ';
        foreach($posttags as $tag) 
        {
              $count++;
              if ($count <= 3) 
              {
                   $tagoutput .= $tag -> name . ', ';
              }
         }
    }
    
    $tagoutput = (substr($tagoutput,-2) == ', ') ? substr($tagoutput, 0, -2) : $tagoutput;
    echo $tagoutput ;
    

    2) Yes :)

    Regards,
    Peter

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Limit Tags in Single Post’ is closed to new replies.