Answers.Body: <p>Try using the relatedTo() filter as explained here:</p>
  
  <p><a href="http://buildwithcraft.com/help/entries-related-to-category" rel="noreferrer">http://buildwithcraft.com/help/entries-related-to-category</a></p>
  
  <pre><code>{% paginate craft.entries.section('products').relatedTo(requestCategory).limit(9) as entriesOnPage %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-29T07:32:36.703Z
Answers.LastActivityDate: 2015-06-29T07:32:36.703Z
Answers.UserDisplayName: j00lz
Body: <p>Below is my paginate code and it's working fine.</p>
  
  <pre><code>{% paginate craft.entries.section('products').limit(9) as entriesOnPage %}
  
  {% for entry in entriesOnPage %}
      &lt;div class="product-box"&gt;
          &lt;div class="product"&gt;
              &lt;p class="product-name"&gt;
                  &lt;a href="{{ entry.category.first().url }}"&gt;{{ entry.category.first().title }}&lt;/a&gt;
              &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  {% endfor %}
  
  {% if paginate.nextUrl %}
      &lt;a href="{{ paginate.nextUrl }}"&gt;Next&lt;/a&gt;
  {% endif %}
  
  {% endpaginate %}
  </code></pre>
  
  <p>Below is my code to display specific category data with pagination. and it's not working.</p>
  
  <pre><code>{% set requestCategory = craft.request.getLastSegment() %}
  
  {% paginate craft.entries.section('products').find({
      search: 'categories:' ~ requestCategory,
    }).limit(9) as entriesOnPage %}
  
  {% for entry in entriesOnPage %}
      &lt;div class="product-box"&gt;
          &lt;div class="product"&gt;
              &lt;p class="product-name"&gt;
                  &lt;a href="{{ entry.category.first().url }}"&gt;{{ entry.category.first().title }}&lt;/a&gt;
              &lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  {% endfor %}
  
  {% if paginate.nextUrl %}
      &lt;a href="{{ paginate.nextUrl }}"&gt;Next&lt;/a&gt;
  {% endif %}
  
  {% endpaginate %}
  </code></pre>
  
  <p>i want to add category filter on that but not working how can i add a category filter?</p>
  
Tags: <filter><category>
Title: Paginate with category filter?
ThreadText: # Paginate with category filter?
  
  (Asked by: username_0 on 2015-06-29)
  
  Below is my paginate code and it's working fine.
  
  ```
  {% paginate craft.entries.section('products').limit(9) as entriesOnPage %}
  
  {% for entry in entriesOnPage %}
      <div class="product-box">
          <div class="product">
              <p class="product-name">
                  <a href="{{ entry.category.first().url }}">{{ entry.category.first().title }}</a>
              </p>
          </div>
      </div>
  {% endfor %}
  
  {% if paginate.nextUrl %}
      <a href="{{ paginate.nextUrl }}">Next</a>
  {% endif %}
  
  {% endpaginate %}
  
  ```
  
  Below is my code to display specific category data with pagination. and it's not working.
  
  ```
  {% set requestCategory = craft.request.getLastSegment() %}
  
  {% paginate craft.entries.section('products').find({
      search: 'categories:' ~ requestCategory,
    }).limit(9) as entriesOnPage %}
  
  {% for entry in entriesOnPage %}
      <div class="product-box">
          <div class="product">
              <p class="product-name">
                  <a href="{{ entry.category.first().url }}">{{ entry.category.first().title }}</a>
              </p>
          </div>
      </div>
  {% endfor %}
  
  {% if paginate.nextUrl %}
      <a href="{{ paginate.nextUrl }}">Next</a>
  {% endif %}
  
  {% endpaginate %}
  
  ```
  
  i want to add category filter on that but not working how can i add a category filter?
  
  **Tags:** filter, category
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-06-29. Score: 4 | Accepted answer
  
  Try using the relatedTo() filter as explained here:
  
  <http://buildwithcraft.com/help/entries-related-to-category>
  
  ```
  {% paginate craft.entries.section('products').relatedTo(requestCategory).limit(9) as entriesOnPage %}
  
  ```
  
  
  ---
  
  