For use in a post, I’d say this:
<?php echo strip_tags(get_the_tag_list('',', ','')); ?>
Dunno if that would work in the title. get_the_tag_list is a Loop thing.
neither single_tag_title (i even tried single cat title) nor striping post worked.
i used this code in title
<?php if (is_tag()) { ?>
<?php echo ‘Articles tagged with: ‘; ?>
<?php single_tag_title(); } ?>
but shows nothing
even tried without any if queries, but no result 🙁 it shows nothing.
even tried this one
<?php if ( is_single() ) { single_tag_title(); } ?>
even the_tags(); didn’t work on header.php
i ported my theme from 2.2 to 2.3, i checked default theme codes, but not en extra code included. do i have to add some lines to header.php?
It needs to be in array surely?
This plugin has a function to list tags in plaintext – perhaps it could be of use…
http://www.herewithme.fr/wordpress-plugins/simple-tags
Huh. The link I gave shows how I show tags in title (in 2.3). Not sure why that wouldn’t work for anyone else.
okay, i see how it works.. when i go to a tag page (posts which are tagged with that), it shows the tag
but what i want is to show all the tags for the simple post page…
i mean,
<?php if ( is_single() ) { single_tag_title(); } ?>
how can this code (or something like this) work ??
thanks for help 🙂
Well, the code I posted will work in the Loop, however if you’re doing this somewhere else, outside the Loop, then you need to take special measures.
Like, if you were doing it in the header.php:
<?php
if (is_single()) { the_post(); rewind_posts();
echo strip_tags(get_the_tag_list('',', ',''));
} ?>
@otto42, Worked like a charm, Thanks so much 🙂