<pre><code>{% paginate myUserQuery as users  %}

{% for user in users %}

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

<p><a href="https://docs.craftcms.com/v3/dev/tags/paginate.html#showing-the-elements" rel="nofollow noreferrer">This should help you</a> also.</p>

CC BY-SA 4.0
2019-02-19T11:36:28.697Z
2019-02-19T11:36:28.697Z
Oli
<p>How do I get pagination set up with the following? It should be easy but I'm getting in a muddle.</p>

<pre><code>{% set myUserQuery = craft.users().group('members').order('companyName asc').limit(10).find %}
{% set users = myUserQuery %}


&lt;div class="col-24 gutter-bottom--none flex-container"&gt;

  {% for user in users %}
      {% include "includes/_directory-list" %}
  {% endfor %}

&lt;/div&gt;

{% include "includes/_pagination" %}
</code></pre>

<hr>

<p>I thought I might be able to do this, but no</p>

<pre><code>{% paginate users %}
</code></pre>

<pagination>
Pagination with users
# Pagination with users

(Asked by: username_0 on 2019-02-19)

How do I get pagination set up with the following? It should be easy but I'm getting in a muddle.
{% set myUserQuery = craft.users().group('members').order('companyName asc').limit(10).find %}
{% set users = myUserQuery %}




  {% for user in users %}
      {% include "includes/_directory-list" %}
  {% endfor %}



{% include "includes/_pagination" %}


I thought I might be able to do this, but no
{% paginate users %}

**Tags:** pagination

---

## 1 answers

### Answer by username_1 on 2019-02-19. Score: 1 | Accepted answer

{% paginate myUserQuery as users  %}

{% for user in users %}

{% endfor %}

This should help you also.


---

