wp_tag_cloud() and the_taxonomies() work but not the_tag()

wp_tag_cloud() and the_taxonomies() work in a widget I built but I can not get the_tags() to work.

I want to display the tags assigned to the current post. I built a widget to do this. the widget works fine but as I mentioned, wp_tag_cloud() and the_taxonomies() will display.

Read More

I have tried every possible code snippet I could find.

Whats happening and do I display the posts tags?

Related posts

Leave a Reply

2 comments

  1. I could not see the forest between the trees.

    I was dealing with a custom taxonomy and solved the problem with get_the_terms().

        $kw_tags = '';
        $tags    = get_the_terms( $pid, 'place_tags' );
        $xt          = 1;
    
        if ($tags && ! is_wp_error($tags)) {
            ?><h4><?php echo get_option('tag_cloud_title'); ?></h4><?php
            foreach ($tags as $tag) {
                $kw_tags = $tag->name;
                ?>
                <span class="tag-widget"><a href="<?php ?>" title="<?php ?>"><?php echo $kw_tags; ?></a></span>
                <?php
                $xt++;
            }
        }