title: How do I get all the post tags in WordPress?
body: <p>I would like to get all the post tags in my WordPress. Below is my code in the footer:</p>
  
  <pre><code>&lt;?php
  global $wpdb;
  
  $tags = get_terms('post_tag');
  echo '&lt;ul&gt;';
  foreach ($tags as $tag)
  {
      echo '&lt;li&gt;' . $tag-&gt;name . '&lt;/li&gt;';
  }
  echo '&lt;/ul&gt;';
  ?&gt;
  </code></pre>
  
  <p>With the above code I am getting only the tags associated with a specific post, not the entire list of tags in WordPress.</p>
  
  <p>Any help will be appreciated.
  Thanks.</p>