WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » Adding product categories to custom menus?

Adding product categories to custom menus?

  • The only way I’ve found to add product categories to custom menus is to add them as “custom” links, using html like

    http://moparchicago.com/?product_cat=woozles

    or, (live link)

    http://moparchicago.com/?product_cat=hefalumps

    Isn’t there something more … integral to Woocommerce that does this?

    I’m just trying to build a store structure that is going to hold up to theme changes, that doesn’t use any hacks or php code insertions, just the core functionality of Woocommerce and perhaps plugins/extensions if absolutely needed.

    Is this method as good as it gets?

    The examples are a pure test (sandbox) store that obviously ins’t going to go live as a place to buy woozles and hefalumps.

    I’ve got a more elaborate test store at another URL, this one only has 4 simple products, but it should be enough to test/demonstrate product categories.

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 38 total)
  • Not sure exactly what you are trying to do but if it is what I think, you can add product categories as sub pages to the “Shop” page by adding a page per categoy then including shortcodes to reflect the products under the category page.

    For example, add a new page for “Hefalumps”, then include the short code for that particular category:

    [product_category category=”hefalumps”] (assuming this is the slug you assigned to that category)

    in that same page include the products short code to display anything under “hefalumps”

    [product_category category=”hefalumps” per_page=”12″ columns=”4″ orderby=”date” order=”desc”]

    save the page then go to “Appearance” then “Menus” select the new page “Hefalumps” and add it to your custom menu as a sub page to “Shop” save your menu.

    Now you should be able to see the “Hefalump” page under your “Shop” page, click on it and it should direct you to the “Hefalump” page you created displaying all of the products under the “hefalump” slug.

    Hope this helps!

    Roy Ho

    @splashingpixelscom

    Hmmmm actually the easier way is just add it like a normal category/page…You don’t need shortcode anything…

    Go to menus, top right screen options pull the tab down. Check the box for product categories….Now you have access to put product categories in your menu…is that simple…

    Bingo! That is what I was hunting for … I just didn’t see “Screen Options” before.

    Thank you!

    Indeed!!! Thank you, splashingpixels.com

    Citynode very helpfull! Thankyou

    splashingpixels.com you’re a star! Cheers mate.

    @splashingpixels.com Thanks!

    Splashingpixels – you are AWESOME! Thank you! I have been searching for that answer almost all day now.

    Hi Mrgmsr,

    I have followed the way you provided and it is working like so fine. THanks for your post. and no need to make the pages as sub-menu under shop. It`s working fine even when placed in main-menu. Once again, thanks a lot.

    You are really a splashingpixel, splashingpixels.com…Mucho Gracias..

    @splashingpixels.com
    We all of are forgot the above screen options. Thank you for your nice answer 🙂

    I dont see that options in my screen options?

    Just to note an easy hack to allow the top menu item to not be a category itself and act as a true parent to all of them

    For example you want the menu to be:

    -Products
    — cats
    — dogs
    — fish
    —–goldfish

    You just have to make -Products a link item with the link set to “#” then drag the product categories under it.

    Thanks……

    thanx alot buddy splashingpixels i was unable to do this.

Viewing 15 replies - 1 through 15 (of 38 total)
  • The topic ‘Adding product categories to custom menus?’ is closed to new replies.
Skip to toolbar