Hide product from specific category in "EM Latest product" wigdet

CodeVibrant Forums Easy Mart Hide product from specific category in "EM Latest product" wigdet

This topic contains 4 replies, has 2 voices, and was last updated by  dragoeco 2 weeks, 5 days ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3522

    dragoeco
    Participant

    Hi,

    First, thanks a lot for this great theme!

    I’m looking for a way (ex: a filter on the function.php file) to hide all products from a specific category (ID or name) inside the “EM: Featured/Latest product” wigdet.

    I’ve found several sniped on stackoverflow but none of them are working for me :/ Could you please help me?

    Thanks.

    Pierre

    #3525

    codevibrant
    Keymaster

    Hello there,

    If you are adding extra code at functions.php file it affects the whole site so please use the required code at the particular widget.

    Thanks,

    #3535

    dragoeco
    Participant

    Hi,

    thanks for your answer. In fact, that’s exactly what I need 🙂

    I’m importing products to a category named “pending”. I use it to import them but I need to make some modifications (change image, text…) before publishing them.

    So, I used the sniped found here to hide all products from this category and it works, except for the EM widget.

    So I guess I need to find a way to ask the widget not to “grab” all the products from that category, or at least, being able to select which categories can be displayed in the widget.

    Is there a way to achieve that without touching the theme core file (I made a child theme) ?

    Thanks,

    Pierre

    #3537

    codevibrant
    Keymaster

    Hello there,

    You should edit the code of a particular widget code where you want some changes. So please go to inc/widgets/cv-featured-latest-product-list.php file and add your sniped code at $product_args array.

    Thanks,

    #3538

    dragoeco
    Participant

    Ok, I got it. Thanks.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Hide product from specific category in "EM Latest product" wigdet’ is closed to new replies.

FESTIVE SALE 2019 !! Use Coupon code #CVFESTIVE to get 25% OFF on any of our Premium Products.