Answers.Body: <p>To display a single category you'll need to do something like this:</p>
  <pre><code>{% set category = entry.categoryfieldhandle.one() %}
  {{category.title}}
  </code></pre>
  <p>To display multiple categories:</p>
  <pre><code>{% set categories = entry.categoryfieldhandle.all() %}
  {% for category in categories %}
  {{category.title}}
  {% endfor %}
  </code></pre>
  <p>Replace <code>categoryfieldhandle</code> with the handle you used for your field.</p>
  <p>You can find more in depth and alternative ways in the docs:</p>
  <p><a href="https://craftcms.com/docs/3.x/relations.html" rel="nofollow noreferrer">https://craftcms.com/docs/3.x/relations.html</a></p>
  <p>Since you're new to craft I recommend taking a look at the following course <a href="https://craftquest.io/courses/craft-cms-3-tutorials" rel="nofollow noreferrer">https://craftquest.io/courses/craft-cms-3-tutorials</a> to help get you started.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-23T08:46:55.280Z
Answers.LastActivityDate: 2020-09-23T08:46:55.280Z
Answers.UserDisplayName: Steven Vandemoortele
Body: <p>I know this is a really suck egg question, but I finding the Craft docs far less straightforward than EE (I'm just switching over), and so I'm struggling with the easy task of displaying an entry's category.</p>
  <pre><code>{% for entry in craft.entries.section('blog').limit(1) %}
     &lt;h2&gt;{{ entry.title }}&lt;/h2&gt;
                                
     
     {% if entry.byLine %}
     &lt;h3&gt;{{ entry.byLine }}&lt;/h3&gt;
     {% endif %}
                             
     &lt;h3&gt;Category: { ???? } &lt;/h3&gt;
     
     {% endfor %} 
  </code></pre>
  <p>Can anyone help?</p>
  
Tags: <craft3>
Title: Display entry category
ThreadText: # Display entry category
  
  (Asked by: username_0 on 2020-09-23)
  
  I know this is a really suck egg question, but I finding the Craft docs far less straightforward than EE (I'm just switching over), and so I'm struggling with the easy task of displaying an entry's category.
  
  ```
  {% for entry in craft.entries.section('blog').limit(1) %}
     <h2>{{ entry.title }}</h2>
                                
     
     {% if entry.byLine %}
     <h3>{{ entry.byLine }}</h3>
     {% endif %}
                             
     <h3>Category: { ???? } </h3>
     
     {% endfor %} 
  
  ```
  
  Can anyone help?
  
  **Tags:** craft3
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-09-23. Score: 1 | Accepted answer
  
  To display a single category you'll need to do something like this:
  
  ```
  {% set category = entry.categoryfieldhandle.one() %}
  {{category.title}}
  
  ```
  
  To display multiple categories:
  
  ```
  {% set categories = entry.categoryfieldhandle.all() %}
  {% for category in categories %}
  {{category.title}}
  {% endfor %}
  
  ```
  
  Replace `categoryfieldhandle` with the handle you used for your field.
  
  You can find more in depth and alternative ways in the docs:
  
  <https://craftcms.com/docs/3.x/relations.html>
  
  Since you're new to craft I recommend taking a look at the following course <https://craftquest.io/courses/craft-cms-3-tutorials> to help get you started.
  
  
  ---
  
  