Forums

how to display post tags unlinked (2 posts)

  1. albihoti
    Member
    Posted 2 years ago #

    Hello, how to display list of tags to a single page but without links, like simple text.

  2. alchymyth
    The Sweeper
    Posted 2 years ago #

    http://codex.wordpress.org/Function_Reference/get_the_tags

    The following example displays the tag name of each tag assigned to the post (this is like using the_tags(), but without linking each tag to the tag view, and using spaces instead of commas):

    <?php
    $posttags = get_the_tags();
    if ($posttags) {
    foreach($posttags as $tag) {
    echo $tag->name . ' ';
    }
    }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic