Thread Starter
tgwpqd
(@tgwpqd)
I try
<?php
global $tag;
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
echo $tag->name . ‘ ‘; }
}
?>
but still nothing
Thread Starter
tgwpqd
(@tgwpqd)
The post have tags, and I try:
<?php
if(get_the_tag_list()) {
get_the_tag_list(”); }
?>
however, still nothing
can anyone help?
put <p><?php the_tags(); ?></p> within The Loop.
More info,
http://codex.ww.wp.xz.cn/Template_Tags/the_tags
Thread Starter
tgwpqd
(@tgwpqd)
I did try that before, but get nothing
Try it again, and put it in the correct place this time, for example inside The Loop (you know what this is?) on the single.php Single Post Template of your current theme (you know where this is?).
If that doesn’t work then read the link I gave you in detail. It is the documentation that explains everything about this code, I would just be repeating what that link says.
Also, just so you know, it is not a Cloud when it is related to 1 post. The tag cloud makes a cloud from the tags of alllll posts, that is how it makes the cloud with bigger (more commonly used tags) and smaller (less used tags). On the single post, each tag is used exactly once, so there isn’t bigger and smaller with the_tags, more like a list instead.
Thread Starter
tgwpqd
(@tgwpqd)
maybe I was use the wrong Loop, can you write a example Loop for the tag to me to have look?