WordPress.org

Ready to get started?Download WordPress

Forums

Display the tags (5 posts)

  1. taghaboy
    Member
    Posted 4 years ago #

    hi;
    how can i display the tags with no links and special html to use it in the header title :
    <title>tags</title>

  2. MichaelH
    Member
    Posted 4 years ago #

    <?php
    $alltags = get_terms('post_tag');
    if ($alltags){
     foreach( $alltags as $tag ) {
    echo '<p>' . $tag->name . '</p>';
    }
    }
    ?>

    See Function_Reference/get_terms

  3. taghaboy
    Member
    Posted 4 years ago #

    hi
    thanks for your reply,
    the code print all the tags i used, but i'd like only to show the tag i used in the post.
    Thanks for the help

  4. gilesb
    Member
    Posted 4 years ago #

    This is exactly what im trying to do as well.

    Anybody else have any ideas?

    I want to be able to use the custom taxonimies (tags) that are on the current post as call names so dont want them wrapped in Anchor links or any other html/css.

    Is this possible?

    Thanks guys

  5. MichaelH
    Member
    Posted 4 years ago #

    $taxonomy='post_tag';
    $terms = wp_get_post_terms( $post->ID , $taxonomy, '');

Topic Closed

This topic has been closed to new replies.

About this Topic