How to separate the tags?

You need to use another function to get the tags, something that returns an object or an array, like that you can manipulate it as you need.

http://codex.wordpress.org/Function_Reference/get_tags

<?php $my_tags = get_the_tags();?>

Then where you need the first tag:

<?php echo $my_tags[0]->name?>

For looping the rest except the first tag:

<?php $count=1;
foreach ($my_tags as $my_tag) {
    if ($count != 1) {?>
        <li>
            <a href="https://wordpress.stackexchange.com/questions/151788/<?php echo get_tag_link($my_tag->term_id);?>">
                <?php echo $my_tag->name?>
            </a>
        </li>   
    <?php }
    $count++;
}?>

Hope it helps!

Leave a Comment