Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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?

    #980986

    Hey Mike,

    Do you mean products which do not have a price? Did you try to check the WooCommerce documentation?

    Best regards,
    Rikard

    #981298

    I 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..

    #981454

    Hi,

    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,
    Rikard

    #981712

    Thanks 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.

    #981939

    Hi,

    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,
    Rikard

    #982249

    Thanks, 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.

    #982626

    Hi,

    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,
    Rikard

    #982931

    Feel free to close

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.