Answers.Body: <p>You'd need to get the tag model first.</p>
  
  <pre class="lang-twig prettyprint-override"><code>{% set tag = craft.tags.search('My Tag').first() %}
  {% if tag %}
      {% set entries = craft.entries.relatedTo(tag) %}
  {% endif %}
  </code></pre>
  
  <p>Replace <code>search</code> with whatever other information you have from the tag, to get more precise results, e.g., <code>slug</code>, <code>id</code> properties.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-10T00:48:07.030Z
Answers.LastActivityDate: 2018-01-15T13:51:15.027Z
Answers.LastEditDate: 2018-01-15T13:51:15.027Z
Answers.UserDisplayName: carlcs
Body: <p>I want to only show entries that match a specific tag. I'm trying to do something like:</p>
  
  <pre><code>{% paginate craft.entries.section('blog').relatedTo('tagName').order('score') as entriesOnPage %}
  </code></pre>
  
  <p>This doesn't seem to net any results though. Is <code>.relatedTo()</code> not the way to go when limiting results to a specific tag?</p>
  
Tags: <templating><entries><tags>
Title: Query Entries by Tag
ThreadText: # Query Entries by Tag
  
  (Asked by: username_0 on 2016-03-10)
  
  I want to only show entries that match a specific tag. I'm trying to do something like:
  
  ```
  {% paginate craft.entries.section('blog').relatedTo('tagName').order('score') as entriesOnPage %}
  
  ```
  
  This doesn't seem to net any results though. Is `.relatedTo()` not the way to go when limiting results to a specific tag?
  
  **Tags:** templating, entries, tags
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-03-10. Score: 5 | Accepted answer
  
  You'd need to get the tag model first.
  
  ```twig
  {% set tag = craft.tags.search('My Tag').first() %}
  {% if tag %}
      {% set entries = craft.entries.relatedTo(tag) %}
  {% endif %}
  
  ```
  
  Replace `search` with whatever other information you have from the tag, to get more precise results, e.g., `slug`, `id` properties.
  
  
  ---
  
  