Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

mrfraz on "Show second tag"

$
0
0

I have a code-snippet on my site to show the last second tag.

<?php
$posttags = get_the_tags();
$count=0;
if ($posttags) {
  foreach($posttags as $tag) {
    $count++;
    if (2 == $count) {
	echo '<a href="http://www.xyz.com/' . $tag->slug . '" alt="' . $tag->name . '" title="' . $tag->name . '">' . $tag->name . '</a>';
    }
  }
}
?>

i include this.. on the tag-page..

18 sites... and on one... it is the wrong tag.
i can't find the bug... is it in the database?

thanks for help.


Viewing all articles
Browse latest Browse all 8245

Trending Articles