Tagged: categories, products, woo commerce
-
AuthorPosts
-
July 4, 2018 at 12:38 am #980826
Does anyone know if there’s a way to have freebies only show up in your freebies category page and not with your premium products in WooCommerce using Enfold?
- This topic was modified 6 years, 5 months ago by Linseed_Studio.
July 4, 2018 at 8:25 am #980986Hey Mike,
Do you mean products which do not have a price? Did you try to check the WooCommerce documentation?
Best regards,
RikardJuly 4, 2018 at 5:18 pm #981298I mean products with $0 dollar amounts categorized as freebies. I’m trying to separate the premium products in my shop (https://linseedstudio.com/shop/) from the freebies (https://linseedstudio.com/product-category/freebies/) but the freebies always show up in the regular shop. I checked the documentation but I wasn’t able to find anything pertaining to this and I thought the solution might somehow tie in with Enfold – it might just be a WooCommerce thing though..
July 5, 2018 at 8:12 am #981454Hi,
Thanks for the feedback. Please try this in your functions.php file:
function linseed_hide_free_products(){ if(is_shop()) { ?> <style> .product_cat-freebies { display:none; } </style> } <?php } add_action('wp_head', 'linseed_hide_free_products');
Best regards,
RikardJuly 5, 2018 at 7:45 pm #981712Thanks Rikard – I tried it and it shut the shop page down so I’m wondering if the php syntax either on your end or my end (most likely mine) is incorrect. Here is the function exactly as it is pasted into the functions.php of my child theme.
July 6, 2018 at 9:51 am #981939Hi,
Sorry about that, looks like there was a curly bracket in the wrong place. Please try this instead:
function linseed_hide_free_products(){ if(is_shop()) { ?> <style> .product_cat-freebies { display:none; } </style> <?php } } add_action('wp_head', 'linseed_hide_free_products');
Best regards,
RikardJuly 6, 2018 at 10:48 pm #982249Thanks, but it still seems to break the site when I add it. I actually now questioning whether I want the two categories to be separated so I may just come back to it later. Thanks for your suggestions.
July 8, 2018 at 6:05 am #982626Hi,
Thanks for the feedback. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardJuly 9, 2018 at 4:59 am #982931Feel free to close
-
AuthorPosts
- You must be logged in to reply to this topic.