<p>This should do it:</p>

<pre><code>{# Get all of the entries in the 'volunteerPosition' section #}
{% set entries = craft.entries.section('volunteerPosition').find() %}

{# Do we have any %}
{% if entries|length %}

    {# Loop through them #}
    &lt;ul&gt;
        {% for entry in entries %}
            &lt;li&gt;{{ entry.volunteerShortDescription }}
        {% endfor %}
    &lt;/ul&gt;

{% else %}
    {# Nothing to see here #}
    Sorry, nothing to show.
{% endif %}
</code></pre>

CC BY-SA 3.0
2017-10-12T21:15:24.530Z
Yep that did it! I just had to change that endif to an endfor for the looping content. Thanks a bunch!
kingkelly
CC BY-SA 3.0
2017-10-12T20:54:52.830Z
2017-10-13T02:01:47.313Z
2017-10-13T02:01:47.313Z
Brad Bell
<p>I'm having a bit of trouble showing a message if there's no entries in my blog. I tried the length filter but my empty message wont show:</p>

<pre><code>{% for entry in craft.entries.section('volunteerPosition').find() %}
  {% if entry.volunteerPosition|length %}

      {{entry.volunteerShortDescription}}

  {% else %}

      Sorry, Nothing to show.

  {% endif %}
{% endfor %}
</code></pre>

<entries><filter>
If no blog entries, show something else
# If no blog entries, show something else

(Asked by: username_0 on 2017-10-12)

I'm having a bit of trouble showing a message if there's no entries in my blog. I tried the length filter but my empty message wont show:
{% for entry in craft.entries.section('volunteerPosition').find() %}
  {% if entry.volunteerPosition|length %}

      {{entry.volunteerShortDescription}}

  {% else %}

      Sorry, Nothing to show.

  {% endif %}
{% endfor %}

**Tags:** entries, filter

---

## 1 answers

### Answer by username_1 on 2017-10-12. Score: 2 | Accepted answer

This should do it:
{# Get all of the entries in the 'volunteerPosition' section #}
{% set entries = craft.entries.section('volunteerPosition').find() %}

{# Do we have any %}
{% if entries|length %}

    {# Loop through them #}
    
        {% for entry in entries %}
            {{ entry.volunteerShortDescription }}
        {% endfor %}
    

{% else %}
    {# Nothing to see here #}
    Sorry, nothing to show.
{% endif %}

> **Comments:**
> **username_0**: Yep that did it! I just had to change that endif to an endfor for the looping content. Thanks a bunch!  

---

