# Can I change the number of results shown in the Swiftype WordPress autocomplete?

**URL:** <https://community.swiftype.com/t/can-i-change-the-number-of-results-shown-in-the-swiftype-wordpress-autocomplete/87>\
**Category:** WordPress\
**Created:** [December 21, 2015, 11:28pm UTC](https://community.swiftype.com/t/can-i-change-the-number-of-results-shown-in-the-swiftype-wordpress-autocomplete/87 "2015-12-21T23:28:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/swiftype/original/1X/fd652d1735c60057fa71c371375511028f9a1832.png) [@system](https://community.swiftype.com/u/system)\
**Post date:** [December 21, 2015, 11:28pm UTC](https://community.swiftype.com/t/can-i-change-the-number-of-results-shown-in-the-swiftype-wordpress-autocomplete/87/1 "2015-12-21T23:28:04Z")

</div>

Yes, you can change the number of autocomplete results using the **`resultLimit`** option of the **`swiftypeConfig`** JavaScript object. Add the following code to your theme’s **`functions.php`** file:

```auto
function swiftype_javascript_config() {
?>
<script type="text/javascript">
var swiftypeConfig = {
  resultLimit: 5 // set to your desired number of results
};
</script>
<?php
}

add_action('wp_head', 'swiftype_javascript_config');

```

**NOTE:** This will not affect the number of results returned on the search results page.

For more details, see [Customizing autocomplete](https://swiftype.com/documentation/tutorials/customizing_wordpress_search#customizing-autocomplete) in the [WordPress customization tutorial](https://swiftype.com/documentation/tutorials/customizing_wordpress_search).
