WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Adding product categories to custom menus? (39 posts)

  1. citynode
    Member
    Posted 1 year ago #

    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/

  2. MRGMSR
    Member
    Posted 1 year ago #

    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!

  3. Roy Ho
    Member
    Posted 1 year ago #

    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...

  4. citynode
    Member
    Posted 1 year ago #

    Bingo! That is what I was hunting for ... I just didn't see "Screen Options" before.

    Thank you!

  5. MRGMSR
    Member
    Posted 1 year ago #

    Indeed!!! Thank you, splashingpixels.com

  6. Achuwoky
    Member
    Posted 1 year ago #

    Citynode very helpfull! Thankyou

  7. guttenbergovitz
    Member
    Posted 1 year ago #

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

  8. Peter Knol
    Member
    Posted 1 year ago #

    @splashingpixels.com Thanks!

  9. ymaungBCIT
    Member
    Posted 1 year ago #

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

  10. sabarinath
    Member
    Posted 12 months ago #

    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.

  11. evansamlalo
    Member
    Posted 12 months ago #

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

  12. sumonbdinfo
    Member
    Posted 11 months ago #

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

  13. zaccc
    Member
    Posted 11 months ago #

    I dont see that options in my screen options?

  14. wycks
    Member
    Posted 10 months ago #

    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.

  15. Jagdeep Bhuyan
    Member
    Posted 10 months ago #

    Thanks......

  16. sayedarif88
    Member
    Posted 10 months ago #

    thanx alot buddy splashingpixels i was unable to do this.

  17. rcpower316
    Member
    Posted 10 months ago #

    Ok, please help me here. Not sure what I am doing wrong.

    I created my menu as stated above with the Products Category (Product 1 & Product 2) as the top links in my menu. That works great and takes me to the Shop page and only for the category I set it for in the menu admin. No problem there.

    But, when I use my woo-commerce layered nav filters, it acts like it is working but doesn't filter anything. I know it is reading correctly because when I add a new product, the filters reflect the addition.

    Any suggestions?

  18. nickstaw
    Member
    Posted 9 months ago #

    Superb. Thanks for that!

  19. wefashionapps
    Member
    Posted 9 months ago #

    Fantastic post - Thank you

  20. jishan
    Member
    Posted 8 months ago #

    hello guys
    i have a problem. i add the main menu "PRODUCTS". then i add the products by the plugin--eshop, these products will be show in the list of categories. i want when stick the PRODUCTS main button, these products will be on PRODUCTS page.
    but it is not, when stick PRODUCTS it is blank without anything.
    even i add these products page belong to main menu "PRODUCTS"as secondary list. still can't work.. when put mouse on it the products list will be show as drop-down list.
    hope can get answer to solve it. thanks

  21. kathykehuang
    Member
    Posted 8 months ago #

    I have a question, I use the following code to generate product on the page,

    [product_category category="GREETING CARDS" per_page="9" columns="3" orderby="date" order="desc"]

    However, when the products number exceed 9, this code can't direct to next page. How to display page 1, page 2, page 3.. under the page?

    Thanks!

  22. Chirag Vora
    Member
    Posted 8 months ago #

    Thanks @wycks for the hack.

  23. Ercildoune
    Member
    Posted 7 months ago #

    Wycks thank you for your post:
    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.

    I am trying to accomplish this myself. However, I don't understand the hastag part. In "Appearance," "Menus" I have a Menu titled GENRES. In the "Menu Structure" section I have dragged and dropped "Product Category"'s that I have created. But when I click "Save Menu" and check my website, there is a bullet item that says "No categories" under my Menu. What am I doing wrong?

  24. Chirag Vora
    Member
    Posted 7 months ago #

    @Erildoune you don't want Product to be clicked upon. So all you have to do is this...

    Under menus in WP admin click on Links section on left hand side. Put # in URL field and write Products in linked text field. Click add to menu.

    Now drag -cat -dog -fish etc under Products...

    Did you perform the above steps? If you did, share link to your website.

  25. Ercildoune
    Member
    Posted 7 months ago #

    The "Links" section is looking for a website address and "Link Text."
    Does the "#" (hash tag)in your post mean number in your post?? I don't follow.
    I think maybe I need to make a page with the headings I want for the menu. Am I correct to say that pages set to "0" mean they won't be added to the header tabs of my page and will appear only when the menu title is clicked on?

  26. Chirag Vora
    Member
    Posted 7 months ago #

    @Ercildoune. No, # is '#', # is NOT the Post-ID. We donn't want to click on Products to go to a page. On clicking products we want to stay on same page... therefore we do it by adding "#" (without quotes).

    I don't know whether I am doing a nice job of explaining. :)

  27. Ercildoune
    Member
    Posted 7 months ago #

    Ok, I'm not trying to add a product. Just a link for someone to click on to look at a page to find the product. I have no idea what a Post-Id is. This is an e-commerce website not a blog.
    To see an example of what I am talking about go to BarnesandNoble.com. On the left you will see a list of categories listed (hyperlinks) that will bring you to a page of a genre, i.e. Art, Fiction, Nonfiction, etc.
    I am trying to add "Categories" to the Menu that I have named "Genres."

  28. Chirag Vora
    Member
    Posted 7 months ago #

    The add # as a link and "Genre" as text. Put Art, Fiction, non-fiction etc. as sub-menus.
    -Genres
    -- Art
    -- Fiction
    -- Non-Fiction
    -----Biography

    link Art, fiction... etc to their respective pages.

    If you're facing difficulty please provide link and send login details to my username (at) gmail

  29. Ercildoune
    Member
    Posted 7 months ago #

    I did try entering the # under the "Link" (with and without the http:) and I typed "Arts & Crafts" in the "Link text" field. Then I clicked on Add to Menu, Save Menu. I then refreshed my webpage and it didn't show anything. :(
    But I think you are saying that my Main Menu name is "Genre" that I need to add Submenu cateories??
    Genres
    Art
    Children's
    Fiction
    How do I create a submenu? I just figured out how to make a "Sub" page today. :)
    Here is my webpage: http://www.ercildounepublishing.com/

  30. Ercildoune
    Member
    Posted 7 months ago #

    Ok, I think I figured out how to make submenus... I draged the grey box to the left of the "Link" top box to make the hierarchy. But it still won't change on the website.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic