Trouble Increasing Number of Products Per Page
-
Hello,
I’m having trouble increasing the number of products shown on the shop page of my website. I would like all my products to appear on one page. Currently, one product is on a second page.
I experienced this issue a few months ago and after deactivating each plugin individually, I determined that one was conflicting and limiting the number of products to 12. At the time I deactivated that plugin (and it remains deactivated) and was able to successfully increase the number of products displayed to 16.
I now have 17 products on my website and am having the same issue crop up again. The previously conflicting plugin is still deactivated, so I once again updated everything and then went through deactivating each plugin I have, but no luck.
I’ve tried using the StoreCustomizer and Woo Shortcodes Kit plugins to increase the number of products displayed, but neither seem to be having any affect. I also tried adding this code to the bottom of my child theme’s functions.php file. I found this code on Woocommerce.com.
/** * Change number of products that are displayed per page (shop page) */ add_filter( 'loop_shop_per_page', 'new_loop_shop_per_page', 20 ); function new_loop_shop_per_page( $cols ) { // $cols contains the current number of products per page based on the value stored on Options –> Reading // Return the number of products you wanna show per page. $cols = 30; return $cols; }However, when I added this code to the functions.php file, I received the following message, “Cannot redeclare new_loop_shop_per_page() (previously declared in wp-content/themes/mangnolia-theme.1.8/functions.php:316).
I then located line 316 of the functions.php file and attempted to change the number there to 30 in order to display up to 30 products per page. This had no effect.
Any assistance would be much appreciated! Thank you so much!
….
Edit: I’ve just realized that it doesn’t appear to be the number of products per page that is limiting me, but rather that the shop page will not expand beyond 4 rows. I am able to increase the number of products displaying on a page by increasing the number of products per row; however, if I want to keep it at 4 products per row (which I do), then some products are pushed to a second page. I’ve searched for a way to increase the number of rows shown on the shop page, but cannot find anything.
Any help would be much appreciated!
The page I need help with: [log in to see the link]
The topic ‘Trouble Increasing Number of Products Per Page’ is closed to new replies.
Link to image: