Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Change number of Related Products
New Landing › How can we help? › Themeforest Theme Support › Dante › Change number of Related Products
- This topic has 18 replies, 4 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Dante
-
August 4, 2015 at 5:57 am #200407
This is a two-part question.
1) Is there a way to restrict the number of related products that are visible on a page? E.g. I have used very broad categories to define my products so there are 8-10 related products for each item. I just want 4 to be visible on the page.2) Can I make the images and text for related products smaller? At the moment they’re very big.
Thanks in advance!
August 4, 2015 at 6:00 am #200408August 4, 2015 at 7:34 am #200430Hi,
Please provide me specific page url with related products.
Thanks
MohammadAugust 4, 2015 at 7:50 am #200438Here is an example – http://www.nottheusual.nu/watch/nu-triangle-shaped-diamante-bling-lincoln-centre-mid-size-bracelet-watch-purple/
As you can see there are currently 5 related products. I would like to restrict this number to 4.
Thanks
August 4, 2015 at 8:23 am #200468Hi,
I see only one related product here.
Thanks
MohammadAugust 4, 2015 at 8:46 am #200480Hi Mohammed,
You’re looking at the “You may also like…” section which contains the up-sells part. If you scroll further down, there are now 9 products in “Related products” when I would like to restrict this to just 4.
Thanks.
August 4, 2015 at 8:50 am #200484Hi,
You are right. I see only one You may also like. There is no any related product at this page http://www.nottheusual.nu/watch/nu-triangle-shaped-diamante-bling-lincoln-centre-mid-size-bracelet-watch-purple/.
Thanks
MohammadAugust 4, 2015 at 8:54 am #200489August 4, 2015 at 9:03 am #200496Hi,
Please paste this code at functions.php of child theme.add_filter( 'woocommerce_output_related_products_args', 'jk_related_products_args' ); function jk_related_products_args( $args ) { $args['posts_per_page'] = 4; // 4 related products $args['columns'] = 4; // arranged in 2 columns return $args; }
Thanks
MohammadAugust 4, 2015 at 10:19 am #200533Hi Mohammed,
I tried that before and it doesn’t work, there are still ~9 products visible.
Also I’m still not getting that nice clean look on mobile.Thanks.
August 4, 2015 at 10:56 am #200558Hi,
On Which page url are you watching 9 products? I checked many product but dont seen any related project. Please provide me product page url with 9 related products.
Thanks
MohammadAugust 4, 2015 at 11:04 am #200561August 4, 2015 at 11:22 am #200569Hi,
I have resolved the issue so please check.
Thanks
MohammadAugust 5, 2015 at 5:10 am #200821Awesome, Mohammad! Thanks so much for your help 🙂
August 5, 2015 at 8:19 am #200828Hi,
You most welcome.
Thanks
Mohammad -
Posted in: Dante
You must be logged in to reply to this topic.