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

rafaht on "Problems with tags display"

$
0
0

Hi,
I've modified a theme to my like. I created a CSS class to the post tags and searching, I found this: http://codex.wordpress.org/Function_Reference/get_tags. I've adapted this:

<?php
					$tags = get_the_tags();
					foreach ($tags as $tag){
						$tag_link = get_tag_link($tag->term_id);
						$html .= "<a href=\"{$tag_link}\" title=\"{$tag->name} Tag\" class=\"tags\">";
						$html .= "{$tag->name}</a>";
					}
				?>

On the first post, the tags is correct. But on the second post or more (I display two posts per page), the tags of first post is repeated with the tags of second posts.
How can I fix this?
Thanks so much!


Viewing all articles
Browse latest Browse all 8245

Trending Articles