Support » Fixing WordPress » How To Add Tags Without Links

  • Resolved soulsmasher


    Hi, i want to use tags without links. I’ll show them, but only as plain text. because i’ll use them on title, like i have been using in UTW

    is there any way to do them? i’ve read the documents and couldn’t find a way 🙁


Viewing 11 replies - 1 through 11 (of 11 total)
  • any ideas ? 🙁

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    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…

    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 🙂

    any ideas ?? 🙁

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    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:

    if (is_single()) { the_post(); rewind_posts();
    echo strip_tags(get_the_tag_list('',', ',''));
    } ?>

    @otto42, Worked like a charm, Thanks so much 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How To Add Tags Without Links’ is closed to new replies.