• Resolved baszer

    (@baszer)


    Hello,

    In my theme i don’t want to show the blue cross if there are no tags. (ofcourse) ??

    But I don’t know how to get it right

    this is the code for the tag i use:
    <span class="tags-icon"><?php if (the_tags('', ', ', ' ')); ?></span>

    and this the css code:

    padding: 0px 0px 0px 20px;
    background-image: url(images/tag-icon.png);background-repeat: no-repeat;background-position: center left;
    margin: 0px 0px 0px 10px;

    does somebody has the answer?

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • <php if( get_the_tag_list() ):?> <span class="tags-icon"><?php the_tags('', ', ', ' ');?></span><?php endif;?>

    Thread Starter baszer

    (@baszer)

    hmmm, it’s not working, i get to following error:

    Parse error: syntax error, unexpected T_ENDIF in /var/www/vhosts/eenwebsitevanbas.nl/subdomains/test/httpdocs/wp-content/themes/bbiotodoma/index.php on line 23

    Thread Starter baszer

    (@baszer)

    i got it working now, there was a questionmark missing in the beginning.

    Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No tags div/span if there is no tag’ is closed to new replies.