Why Tags don’t appear in my page?

I must put the post’s tags as a paragraph under the article in my single.php page, this is my code:

<?php $post_tags = wp_get_post_tags($post->ID);
 if(!empty($post_tags)) {?>
            <p><?php the_tags('', ' ', ''); ?></p>
        <?php } ?>

Why it’s not working?

Read more here: Why Tags don’t appear in my page?

Leave a Reply

Your email address will not be published. Required fields are marked *