WordPress.org

Support

Support » Plugins and Hacks » Show only the first three tags

Show only the first three tags

  • How would I go about this? I’ve tried using get_the_tags(), but while I can set up the PHP correctly to cycle three times, it seems I can’t actually access the data…

    $tags = get_the_tags(); if ($tags) { for ($i=0;$i<=2;$i+=1) { echo $tags[$i]->name . ' '; } }

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Show only the first three tags’ is closed to new replies.