Support » Fixing WordPress » Default Theme: Trying to underline tags…

  • I am modifying the Default Theme and I am trying to underline the tags displayed on single.php [and also add a couple spaces between each tag].

    I cannot figure out where to place the edit so that only the individual tags are underlined and not the entire block of tags.

    Any insight? I actually can’t figure out where THE_TAGS is pointing me to. Maybe the change would be there.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Christine Rondeau


    Volunteer Forum Moderator

    You shouldn’t be modifying the twentyten theme. Instead you should have made a child theme.

    But since you’ve already started and if you want to continue,
    what you want to do is go in the css and look for tag-links.
    There should be a style that takes care of the tag links.

    I am using the default Kubrick theme. I could not find an attribute for “tag-links” in either style.css docs.



    Forum Moderator

    the tag list below the single post does not have its selective css class, so you could try to add a style like this to style.css of your theme:
    .entry p a { text-decoration: underline }
    but it will influence every link in the post as well.

    or edit single.php and add a css class to the tags:


    <?php the_tags( '<p>Tags: ', ', ', '</p>');  ?>


    <?php the_tags( '<p class="post-tags">Tags: ', ', ', '</p>');  ?>

    then add to style.css:
    .post-tags a { text-decoration: underline; }

    I implemented that exactly as you described, and it still has no effect:


    .post-tags a {
    text-decoration: underline;

    single.php [has already been slightly modified from default]

    <?php the_tags( ‘<br class=”post-tags”>’, ‘   ‘, ‘</br>’); ?>



    Forum Moderator

    i am not sure if that will work with the br:
    a linebreak is not an element that will contain any other elements.

    a span might work:

    <?php the_tags( '<br/><span class="post-tags">', '   ', '</span><br/>'); ?>

    Closer. This gives me the underlines I want, but runs the keywords off the right side of the screen on 1 line.

    I tried to add width to the css .post-tags.
    I tried to table it in a specified width table.
    I tried a div instead of a span.

    I cannot keep it from running off the page.

    This is the type small detail that raises my blood pressure.


    Thanks for your direction. I stumbled upon it:

    <?php the_tags( ‘<div style=‚ÄĚtext-align: justify; class=”post-tags”>’, ‘        ‘, ‘</div>’); ?>

    .post-tags a {
    text-decoration: underline;
    width: 468px;
    text-align: justify;

    Thanks again for the nudge in the right direction.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Default Theme: Trying to underline tags…’ is closed to new replies.