Default Theme: Trying to underline tags... (8 posts)

  1. pwagner3
    Posted 4 years ago #

    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.

  2. 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.

  3. pwagner3
    Posted 4 years ago #

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

  4. Michael
    Forum Moderator
    Posted 4 years ago #

    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; }

  5. pwagner3
    Posted 4 years ago #

    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>'); ?>

  6. Michael
    Forum Moderator
    Posted 4 years ago #

    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/>'); ?>
  7. pwagner3
    Posted 4 years ago #

    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.

  8. pwagner3
    Posted 4 years ago #


    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.

Topic Closed

This topic has been closed to new replies.

About this Topic