Title: Template for refinementList
Last modified: June 22, 2020

---

# Template for refinementList

 *  Resolved [colevalleygirl](https://wordpress.org/support/users/colevalleygirl/)
 * (@colevalleygirl)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/template-for-refinementlist/)
 * I have installed and configured this plugin (and Algolia) to give the search 
   behaviour I want. However, my search page is configured with three facets e.g.:
 * `/* Skill level refinement widget */
    search.addWidget( instantsearch.widgets.
   refinementList({ container: ‘#facet-skill-level’, attributeName: ‘taxonomies.
   skill_level’, operator: “or”, sortBy: [‘name:asc’], limit: 10, templates: { header:‘
   <h3 class=”widgettitle”>Skill Level</h3>’, item: ‘{{name}} ({{count}})’, }, }));’
 * My objective is to have a checkbox active next to the name, and then the count
   of items in brackets (i.e. the default template except the count is in ()
 * However, my code loses the checkbox.
 * What silly mistake am I making?
    -  This topic was modified 5 years, 11 months ago by [colevalleygirl](https://wordpress.org/support/users/colevalleygirl/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [5 years, 11 months ago](https://wordpress.org/support/topic/template-for-refinementlist/#post-13049306)
 * Hi [@colevalleygirl](https://wordpress.org/support/users/colevalleygirl/)
 * Sorry about the delay in response here.
 * Can you clarify what you’re trying to achieve here? For example are you trying
   to create a “filtered search” kind of thing? Click this checkbox to filter results
   to only the items that have a certain term?
 *  Thread Starter [colevalleygirl](https://wordpress.org/support/users/colevalleygirl/)
 * (@colevalleygirl)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/template-for-refinementlist/#post-13049462)
 * Sorry — I got this sorted using the following template code:
 * ` search.addWidget(
    instantsearch.widgets.refinementList({ container: ‘#facet-
   skill-level’, attributeName: ‘taxonomies.skill_level’, operator: “or”, sortBy:[‘
   name:asc’], limit: 10, templates: { header: ‘<h3 class=”widgettitle”>Skill Level
   </h3>’, item: ‘<input type=”checkbox” class=”ais-refinement-list–checkbox” value
   =”  {{name}}” {{#isRefined}}checked=”true”{{/isRefined}}> {{name}} <span class
   =”ais-refinement-list–count”>({{count}})</span>’, }, }) );’

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Template for refinementList’ is closed to new replies.

 * ![](https://ps.w.org/wp-search-with-algolia/assets/icon-256x256.png?rev=2894668)
 * [WP Search with Algolia](https://wordpress.org/plugins/wp-search-with-algolia/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-search-with-algolia/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-search-with-algolia/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-search-with-algolia/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-search-with-algolia/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-search-with-algolia/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [colevalleygirl](https://wordpress.org/support/users/colevalleygirl/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/template-for-refinementlist/#post-13049462)
 * Status: resolved