{"id":4025351,"date":"2013-08-13T16:56:32","date_gmt":"2013-08-13T16:56:32","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/show-second-tag\/"},"modified":"2016-08-21T03:54:04","modified_gmt":"2016-08-21T03:54:04","slug":"show-second-tag","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/show-second-tag\/","title":{"rendered":"Show second tag"},"content":{"rendered":"<p>I have a code-snippet on my site to show the last second tag.<\/p>\n<pre><code>&lt;?php\n$posttags = get_the_tags();\n$count=0;\nif ($posttags) {\n  foreach($posttags as $tag) {\n    $count++;\n    if (2 == $count) {\n\techo &#039;&lt;a href=&quot;http:\/\/www.xyz.com\/&#039; . $tag-&gt;slug . &#039;&quot; alt=&quot;&#039; . $tag-&gt;name . &#039;&quot; title=&quot;&#039; . $tag-&gt;name . &#039;&quot;&gt;&#039; . $tag-&gt;name . &#039;&lt;\/a&gt;&#039;;\n    }\n  }\n}\n?&gt;<\/code><\/pre>\n<p>i include this.. on the tag-page..<\/p>\n<p>18 sites&#8230; and on one&#8230; it is the wrong tag.<br \/>\ni can&#8217;t find the bug&#8230; is it in the database?<\/p>\n<p>thanks for help.<\/p>\n","protected":false},"template":"","class_list":["post-4025351","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4025351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4025351\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4025351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}