WooCommerce - excelling eCommerce
Want to add link that goes to Sale items (7 posts)

  1. alexandraheller
    Posted 2 years ago #

    I want to add a link in the menu that goes to all the Sale items. So far I haven't found a way other than adding all Sale items into a category. Any suggestions? Thanks!


  2. royho
    Posted 2 years ago #

    You can put product category into your menu via native WordPress menu. This is assuming your theme supports menu. Most themes will.

  3. alexandraheller
    Posted 2 years ago #

    Right, I'm just wondering if there's a way to link to all sale products without manually putting them into a Sale category.

  4. royho
    Posted 2 years ago #

    Anything is possible with custom coding however I am failing to see why you would want this. From my understanding, you could then potentially have so many links on your menu causing layout issues.

    For example you had 20 items on sale, so does that mean 20 new links will show up in your menu?

  5. alexandraheller
    Posted 2 years ago #

    I don't want all sale items to show up on my menu, I want a link on my menu to link to all my sale items.

  6. royho
    Posted 2 years ago #

    Ok, so you were not clear...

    But what you want to do is also possible but will take a bit of work. Depending on how much knowledge you have with PHP. But I will give you a direction to start.

    You can create a normal page say "On Sale". And create a normal page template. You can search for this in the WordPress codex and it will show you how to create that, not hard. For the page you just created "On Sale", set it to the page template.

    Then find and open widgets-onsale.php. It's inside the woocommerce/widgets folder. Within this file will have code loop that you need to paste inside your page template. Look for the function "widget" in that file and you can ignore the rest of the code as they are not needed.

    With this loop, you can manipulate it to how you want it to show on your sale page.

    Hope that helps...

  7. alexandraheller
    Posted 2 years ago #

    Oh great! Thanks, I think I am familiar enough with PHP to do this. Thanks so much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.