• Resolved iviollard

    (@iviollard)


    There are certain products I only need to display in the USA. I have a category labelled ‘USA’ that contains them, however I need to place all of the products NOT in that category into a new one called ‘Rest of world’

    Is there an easy way to do this?

    I am trying to find a way to display the ~200 products (of my ~400 product store) in the USA without needing to go into each and every one and mark it or find the ID.

    My plan is:
    1) find all products not in the USA category
    2) add those to a new ‘Rest of world’ category
    3) for the location of USA hide the category ‘Rest of World’
    4) otherwise show both categories

    If there are better solutions out there I’m all ears!

    • This topic was modified 4 years, 7 months ago by iviollard.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support EastOfWest a11n

    (@eastofwest)

    Hi there!

    For switching categories, there’s a quicker way: from your admin menu go to Products ? All Products, and from the top of that page chose your non-USA category from the Select a Category dropdown list. Click the Filter button to apply, which will then show you only those products that are not in the USA category.

    Now from the top of the far-left column, select the very top checkbox, which will select all the products on that page. From the Bulk Actions dropdown, select Edit, then click the Apply button.

    You’ll see a Product Categories edit box, where you can select and unselect the relevant categories, which will apply to all the products you’ve selected. Only things you change will be edited in this mode, nothing else. Once you’re done, click Update, which will apply the changes in bulk.

    There’s a more visual explanation of this bulk editing process in this article:
    https://nicolamustone.blog/2015/04/21/bulk-edit-products/

    With you products in the proper categories, you can then use the [product] shortcode and the NOT IN operator, explained in the section linked to below:
    https://docs.woocommerce.com/document/woocommerce-shortcodes/#section-10

    The Product by Category block in WooCommerce Product Blocks does something similar, in a more visual way:
    https://woocommerce.com/products/woocommerce-gutenberg-products-block/

    Thread Starter iviollard

    (@iviollard)

    Hi @eastofwest , thanks very much for that! Although I think that you’re a step ahead of me as I only have the products in the USA category at the moment, I want to get all of the products not in that category.

    Do you know of a way to do that?

    Someone mentioned using wp_query which sounds great but I’m not sure where to do that…

    • This reply was modified 4 years, 7 months ago by iviollard.
    Plugin Support EastOfWest a11n

    (@eastofwest)

    Hey @iviollard! You could use the same method described above. First create you Rest of world category, do the bulk edit, check Rest of world and uncheck USA in the Categories/em> box. When you click Apply the checked category is added, and the unchecked category removed.

    You can also increase the products shown per page via this setting, so you can do more per batch:

    Plugin Support Thu P. a11n

    (@thup90)

    Hi there,

    I hope you found the previous reply helpful. We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is there a way to view all products that are not in a category?’ is closed to new replies.