How to limit the number of products on a category page?
Hi,
My category pages show more than 50 products per page. I have set the products per shop page to 24, in Theme Options/ shop/layout, but this doesn't reflect on product category pages. I saw this snippet on StackOverflow but before testing this, I wanted to check if there is a native option to control the product per page in the theme.
add_filter( 'loop_shop_per_page', 'items_per_page_in_product_category_archives', 900 ); function items_per_page_in_product_category_archives( $limit ) { if( is_product_category() ) $limit = 10; return $limit; }
One of the pages of concern is here https://opticone.ae/product-category/frames/
Comments
Hi,
The setting from the Theme options should work correctly.
Please send us WordPress dashboard access privately thru the contact form, which is on the right side at http://themeforest.net/user/muffingroup#contact and we will check what might be the reason.
Notice!
Please attach a link to this forum discussion.
Thanks
You have a huge number of plugins (42!) and all of them are active.
I have disabled them except for basic WooCommerce, and the category showed correctly 24 products.
Please, disable your plugins one by one, and you will find which is the root cause.
Best regards
Yes I do have 42 plugins because theme or Woocomerce doesn't provide all necessary facilities for the workflow :D. Thanks for your help. I'll check which one is the root cause.
Hi,
I have disabled the plugins as advised and isolated the plugin that causes the issue, which is "Variation swatches for WooCommerce".
But there are a few issues I face now.
I tried to log in to your dashboard to check this problem but the login credentials are not working anymore.
Can you send them again through the contact form like previously, please?
Remember to attach a link to this forum discussion.
Thanks
You have Betheme Custom Variations Swatches disabled in the Theme options.
You need to enable them in Betheme -> Theme options -> Shop -> General.
Thanks