title: How to hide the font awesome icon when the text next to it is not displayed?
body: <p>I am trying to show the font awesome icons next to some metadata for my Wordpress posts. An example is the use of the tag icon before the text 'tag' in the following code:</p>
  
  <pre><code>&lt;i class="fa fa-tags" aria-hidden="true"&gt;&lt;/i&gt; &lt;?php eco($tag); ?&gt;
  </code></pre>
  
  <p>The problem is I need to hide the FA icon when the tag name is not shown. I mean if the user decides not to write any tags, the icon sticks there. </p>
  
  <p>Any ideas on how I can get rid of the icon when no tags are written for a post?</p>
  
  <p>The complete code is:</p>
  
  <pre><code>&lt;div class="meta-tags"&gt;
     &lt;?php $tag = get_the_tag_list( __('tags: ', 'themename'),', ' );
     &lt;i class="fa fa-tags" aria-hidden="true"&gt;&amp;nbsp;&lt;/i&gt; &lt;?php echo ($tag); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Thanks</p>