Answers.Body: <p>Argh! this code works! I had duplicate entries and looking at the wrong entry! User erroooor!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-26T16:36:24.703Z
Answers.LastActivityDate: 2019-07-26T16:36:24.703Z
Answers.UserDisplayName: Kev N
Body: <p>I have a number of 'blog' channel entries related to various 'fayre' entries
  I want to display all the blog entries related to the fayre entry page they are related to (Entry field is 'fayreBlog'), but not ones which are not related to that entry, so far I can only display only one blog entry and not more (even though there are more related to the entry I am relating to) not sure where my code is wrong? it resides in the fayres _entry.twig template:</p>
  
  <pre><code>{% set relatedBlogs = craft.entries.section('blog').relatedTo(entry).all() %}
  
  {% for post in relatedBlogs %}
      &lt;p&gt;{{ post.title }} &lt;/p&gt;
  {% endfor %}
  </code></pre>
  
Tags: <relatedto>
Title: Display related entries on the entry page they are related to
ThreadText: # Display related entries on the entry page they are related to
  
  (Asked by: username_0 on 2019-07-26)
  
  I have a number of 'blog' channel entries related to various 'fayre' entries
  I want to display all the blog entries related to the fayre entry page they are related to (Entry field is 'fayreBlog'), but not ones which are not related to that entry, so far I can only display only one blog entry and not more (even though there are more related to the entry I am relating to) not sure where my code is wrong? it resides in the fayres \_entry.twig template:
  
  ```
  {% set relatedBlogs = craft.entries.section('blog').relatedTo(entry).all() %}
  
  {% for post in relatedBlogs %}
      <p>{{ post.title }} </p>
  {% endfor %}
  
  ```
  
  **Tags:** relatedto
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-07-26. Score: 1
  
  Argh! this code works! I had duplicate entries and looking at the wrong entry! User erroooor!
  
  
  ---
  
  