Ecommerce. How to change the number of related products and number of columns they are displayed in
This tutorial reveals the secret of changing the number of related products on the single product’s page of a WooCommerce-based store. Let’s follow the simple steps required to gain the aim!
- First, open your site files storage – you can do it either via the FTP client or using the File Manager tool at your hosting cPanel.
- Navigate to the /wp-content/themes/your_theme_name/ folder (here your_theme_name stands for your actual theme title,i.e., tinyfit).
- Enter this directory and look for the functions.php file inside – you should open it for editing.
- Scroll down to the bottom of that file and paste the following code to the very bottom:
- Check your website, as you can see, the number of the related products in a carousel is now changed to 4, and they are displayed in two columns. You can modify these values to reach the best look for your store.Thank you for attention and wish you good luck with the website!