If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

WooCommerce. How to change “number of products per page” option available values

This tutorial will show you how to change available values of the “number of products per page” option in WooCommerce templates.

WooCommerce. How to change “number of products per page” option available values

The number of products that show up on the default Shop page and Products Category pages can be changed within WordPress Admin Panel in Cherry Options -> Shop Settings -> Products per page.

However, this option is limited to 20 products:

WooCommerce-How_to_change_number_of_products_per_page_option_available_values-1

Let’s find out how to increase this limit.

  1. Log into WordPress Admin Panel, go to Appearance -> Editor tab, open options.php file under themeXXXXX (where XXXXX is the number of your theme) to edit:

    WooCommerce-How_to_change_number_of_products_per_page_option_available_values-2

    Note: You can also edit options.php file via FTP. The path to locate the file is wp-content/themes/themeXXXXX.

  2. In this file, you will find the following lines of code:

    	$per_page_options = array( '4' => 4, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9, '10' => 10, '11' => 11, '12' => 12, '13' => 13, '14' => 14,
    	 '15' => 15, '16' => 16, '17' => 17, '18' => 18, '19' => 19, '20' => 20);
    	

    You just need to duplicate the line to continue the code string. For example, add:

        , '21' => 21, '22' => 22, '23' => 23, '24' => 24
        

    to get 24 products as the limit.

    You can find the example of the lines of code for increased limit of products below:

    WooCommerce-How_to_change_number_of_products_per_page_option_available_values-3
  3. Go back to Cherry Options -> Shop Settings -> Products per page to see that the limit has been increased:

    WooCommerce-How_to_change_number_of_products_per_page_option_available_values-4

Refresh the default Shop page or the Products Category Pages to check the result.

Feel free to check the detailed video tutorial below:

WooCommerce. How to change “number of products per page” option available values
 
Live Chat
We help you to choose the right product.
Start chat