Shortcode for categories

Hi

Cant work this out, so have this code [product_categories]

produces https://www.commissionit.co.uk/1-2/

instead of showing all the categories how do i display a specific category?

thanks

Hi Amin,

Thanks for writing in! Basically there are two shortcodes.

[product_category] – Will display products in a specified product category.
[product_categories] – Will display all your product categories.

You can check examples from the following resource (https://www.cloudways.com/blog/woocommerce-shortcodes-comprehensive-guide/#productcategory).

In your case, try following this example (https://docs.woocommerce.com/document/woocommerce-shortcodes/#scenario-5-specific-categories).

[products limit="8" columns="4" category="hoodies, tshirts" cat_operator="AND"]

Hope that helps.

Thanks, have seen that before.

Is it not possible to show the categories only with just the product count? Not the products themselves.

Can show ALL categories here https://www.commissionit.co.uk/1-2/ but that slows the page so just want to show a few categories like this?

want to show these on my home page https://www.commissionit.co.uk/product-category/gifts-by-recipient/

Hi Amin,

I think it’s not possible, it would require custom shortcode. Though, the 8 count limit should be working as given in the example. In that case, I recommend contacting Woocommerce developer as we’re not sure how their shortcode internal works.

Thanks!

For the community this is how to do it:

[product_categories ids="133,576,325,307"]

Can you tell me how to make this section full width on my homepage?

https://www.commissionit.co.uk

is full width in this page https://www.commissionit.co.uk/1-2/

Hi Amin,

Ah, that explains it, you wish to display specific products and not set of product based on count (similar to recent posts).

And that page is already full-width, but if you’re just referring to the grid in your home page, please inspect your section’s row and turn off Inner container.

Thanks!

You the man :slight_smile:

You are most welcome. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.