WordPress.org

Ready to get started?Download WordPress

Forums

code isn't working for tag separators (7 posts)

  1. peteratomic
    Member
    Posted 3 years ago #

    In single.php, this looks like the code for separating tags with commas:

    <?php the_tags('', ', ', ''); ?>

    However, it doesn't seem to be working as my tags are all running up against each other, such as:

    tag1tag2tag3

    Any ideas?

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance.

  3. peteratomic
    Member
    Posted 3 years ago #

  4. peteratomic
    Member
    Posted 3 years ago #

    you can see music and DJ life smushed up against each other... no comma separation like other templates

  5. esmi
    Forum Moderator
    Posted 3 years ago #

    Try adding:

    .post-info-tags a {padding:0 2px;}

    to the bottom of your stylesheet.

  6. alchymyth
    Forum Moderator
    Posted 3 years ago #

    you can see music and DJ life smushed up against each other... no comma separation like other templates

    'music' is a category, and 'DJ life' is a single tag - so there is no reason to have a comma anywhere.

    look into this post 'technology-explodes-leaving-us-in-the-dust', for instance, where the two tags 'DJ gear' and 'DJ life' are separated by comma.

    you probably need to look back into the code, to see if there is a separation character between <?php the_category(); ?> and <?php the_tags('', ', ', ''); ?>

  7. peteratomic
    Member
    Posted 3 years ago #

    Thanks Alchymyth! That was the thing staring me in the face that I couldn't see!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags