Viewing 15 replies - 1 through 15 (of 28 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Hi john,

    This is how the shortcode will look when excluding categories:
    [recent_products per_page="40" columns="4" category="clothing,music" operator="NOT IN"]

    Just add a list of comma separates category slugs to the “category” attribute.

    Thread Starter john

    (@pawansaini312)

    it is not working
    i used this code
    [recent_products per_page=”40″ columns=”4″ category=”clothing” operator=”NOT IN”]
    but still in recent product list product is showing which category name is clothing

    but in real it should not be show

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    With that shortcode, the products in the “clothing” category should not show up. Make sure “clothing” is the correct category slug.

    I just tested this, and it works for me: https://cld.wthms.co/18tSf/5jl69V3b

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Works here too. Please note that these shortcodes do not affect single product page recent products which get output automatically.

    Thread Starter john

    (@pawansaini312)

    i tried it 4-5 time with different different category
    but it is not showing
    i dont know why
    if there is a other solution then let me know

    Plugin Contributor Mike Jolley

    (@mikejolley)

    You must not use category name, you must use category slug which may be different.

    Thread Starter john

    (@pawansaini312)

    yes sir i use category slug
    butt its not working
    and i dont know why it is not working

    should i update woocommerce

    Plugin Contributor Mike Jolley

    (@mikejolley)

    This hasn’t been fixed in the update because it works sin 2.5.5 too.

    Can you screenshot me your categories, and your page content in the editor (in text mode, not visual editor).

    Thread Starter john

    (@pawansaini312)

    yes i m showing you screen shot and it is not working at all
    https://postimg.org/image/tffomdgfr/
    https://postimg.org/image/4x8f7an8x/
    https://postimg.org/image/kxypvkvmp/

    in first image first i add category
    in second image i add product with category name cloths
    and in third image i add code which you provide to me
    but as you can see that still product is showing and its category name is cloths

    actually my woocommerce is 5 months old version i made some custom change in woocommerce code so i cant not update it
    so if there are other code i have to write or change in other file then let me know

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Put the shortcode into your page https://postimg.org/image/4x8f7an8x/ and test again.

    Thread Starter john

    (@pawansaini312)

    its not page page
    its a product page
    and i want to show it do it for recent products
    not in page
    so i have to change in home page

    Thread Starter john

    (@pawansaini312)

    and where is the shortcut in this image
    you sent me wrong image

    Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Hi John,

    Is the shortcode working correctly when added to just a custom page?

    > actually my woocommerce is 5 months old version i made some custom change in woocommerce code so i cant not update it

    You should never need to edit the core code. What if you changed something that is messing up the product query?

    Thread Starter john

    (@pawansaini312)

    first thing is that i didnt change code code
    i just have old version woocommerce
    and i just check it
    your code is not working in custom code too
    what should i do now ?

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Hi John

    I’m still not clear. I know you don’t want it in a normal page, but I want you to test the code in a normal page to see if it works or not.

    Show me the screenshot of the shortcode in your page content + the result once done.

Viewing 15 replies - 1 through 15 (of 28 total)
  • The topic ‘remove some category product in recent product list’ is closed to new replies.