How can I get post tags in wordpress. I found this method the_tags('Tags: ', ', ', ''); but it shows all tags as links. I just need keywords or tags string. How to...? Any help...?
you can use the function get_the_tags() look in wp codex at http://codex.wordpress.org/Function_Reference/get_the_tags and use it similar to this: <?php $my_prefix = "Tags: "; $my_tag_separator = " "; // you can change it to whatever separator you want // e.g. " · " or " <span class="pad-2-em"> </span> " // or whatever $my_post_tags = get_the_tags(); if ( $my_post_tags) { $tags_output = ""; foreach( $my_post_tags as $tag ) { $tags_output .= ( !$tags_output ) ? $my_prefix . $tag : $my_tag_separator . $tag; } } echo $tags_output; ?> Code (markup):