WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. alexandraheller
    Member
    Posted 1 year 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!

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

  2. royho
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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

About this Topic

Tags

No tags yet.