28th November 2013, 03:57
#2
1 out of 1 members found this post helpful.
Poti folosi functia get_the_tags() in loop pentru a salva tagurile fiecarui post intr-un array.
Inainte de loop declari o functie $paulTags = array();
In loop adaugi urmatorul cod: $newPaulTags = get_the_tags(); $paulTags = array_merge($paulTags, $newPaulTags);
Dupa loop adaugi: $paulTags = array_unique($paulTags);
Acolo unde vrei sa adaugi tagurile poti folosi codul asta:
Cod PHP:
if ($paulTags) {
foreach($paulTags as $tag) {
echo '<a href="'.$tag->slug.'">'.$tag->name.'</a> ';
}
}