Answers.Body: <p>Instead of looping through <code>currentMemberTest</code>, you're currently setting up a fresh criteria model in your <code>for</code> loop.</p>
  
  <p>Use your nicely set <code>currentMemberTest</code> criteria!</p>
  
  <pre><code>{% for entry in currentMemberTest %}
      ...
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-01T09:35:13.543Z
Answers.LastActivityDate: 2016-04-01T09:35:13.543Z
Answers.UserDisplayName: carlcs
Body: <p>Does anyone know how I can show a specific entry to a user (frontend)? My user field is called "gebruiker".</p>
  
  <pre><code>{# Get current member e.g URL /members/1/ #}
  {% set currentMember = craft.users.id(craft.request.segment(2)).first() %}
  
  {# Get current members test entries #}
  {% set currentMemberTest = craft.entries.section('test').relatedTo({
      targetElement: currentMember,
      field: 'gebruiker',
  }) %}
  
  {% for entry in craft.entries.section('test').find() %}
      &lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-md-6"&gt;
                  &lt;h3&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h3&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  {% endfor %}
  </code></pre>
  
  <p>Thanks</p>
  
Tags: <users><relations><entry><frontend><current-user>
Title: User specific entries (relations)
ThreadText: # User specific entries (relations)
  
  (Asked by: username_0 on 2016-04-01)
  
  Does anyone know how I can show a specific entry to a user (frontend)? My user field is called "gebruiker".
  
  ```
  {# Get current member e.g URL /members/1/ #}
  {% set currentMember = craft.users.id(craft.request.segment(2)).first() %}
  
  {# Get current members test entries #}
  {% set currentMemberTest = craft.entries.section('test').relatedTo({
      targetElement: currentMember,
      field: 'gebruiker',
  }) %}
  
  {% for entry in craft.entries.section('test').find() %}
      <div class="container">
          <div class="row">
              <div class="col-md-6">
                  <h3><a href="{{ entry.url }}">{{ entry.title }}</a></h3>
              </div>
          </div>
      </div>
  {% endfor %}
  
  ```
  
  Thanks
  
  **Tags:** users, relations, entry, frontend, current-user
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-04-01. Score: 2
  
  Instead of looping through `currentMemberTest`, you're currently setting up a fresh criteria model in your `for` loop.
  
  Use your nicely set `currentMemberTest` criteria!
  
  ```
  {% for entry in currentMemberTest %}
      ...
  {% endfor %}
  
  ```
  
  
  ---
  
  