Title: codesplice's Replies | WordPress.org

---

# codesplice

  [  ](https://wordpress.org/support/users/codesplice/)

 *   [Profile](https://wordpress.org/support/users/codesplice/)
 *   [Topics Started](https://wordpress.org/support/users/codesplice/topics/)
 *   [Replies Created](https://wordpress.org/support/users/codesplice/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/codesplice/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/codesplice/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/codesplice/engagements/)
 *   [Favorites](https://wordpress.org/support/users/codesplice/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Random number of products per page](https://wordpress.org/support/topic/random-number-of-products-per-page/)
 *  Thread Starter [codesplice](https://wordpress.org/support/users/codesplice/)
 * (@codesplice)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/random-number-of-products-per-page/#post-12289135)
 * Hi Richard,
    Thank you very much for the plugin update. Just tested the code 
   with new version and we are getting expected output for most of the search terms
   except for those where search result count exceeds 1000. In that case we get 
   404 error after first 40 pages eg. tools. We do not have many such terms so not
   worried about it. Happy with the solution! Really appreciate all the help and
   support.
 * Kind Regards
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Random number of products per page](https://wordpress.org/support/topic/random-number-of-products-per-page/)
 *  Thread Starter [codesplice](https://wordpress.org/support/users/codesplice/)
 * (@codesplice)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/random-number-of-products-per-page/#post-12262827)
 * Thanks Richard for your support. Just wanted to let you know that the theme we
   are using is WoodMart.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Random number of products per page](https://wordpress.org/support/topic/random-number-of-products-per-page/)
 *  Thread Starter [codesplice](https://wordpress.org/support/users/codesplice/)
 * (@codesplice)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/random-number-of-products-per-page/#post-12242285)
 * Thanks Richard for the code, just tried it out.
    Now I get exactly 10 products
   on first few pages and 404 errors on all other pages. Suppose I search term ‘
   tools’ then I get 1340 results. with your code I get 134 pages, first 40 pages
   or so with 10 products on them and rest of the pages with 404 error. [https://www.frost.co.uk/?s=tools&post_type=product](https://www.frost.co.uk/?s=tools&post_type=product)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Search with Algolia] Random number of products per page](https://wordpress.org/support/topic/random-number-of-products-per-page/)
 *  Thread Starter [codesplice](https://wordpress.org/support/users/codesplice/)
 * (@codesplice)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/random-number-of-products-per-page/#post-12219765)
 * Hi Michael,
    Thanks for your reply. We have woocommerce plugins installed but
   I don’t think any of them interferes with search functionality or page layouts.
   I just hard coded the $posts_per_page variable in class-algolia-search.php on
   line 52 like: $posts_per_page = 25; // we have Number of products per page = 
   25 for shop page and this did the trick 🙂 Could you please let me know whether
   this is the right approach or not? Will this have any side effect?
 * Kind regards

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