Support » Plugin: WooCommerce » Different archive pages for simple and variable products

  • Resolved hansford77


    I am building a site where the owner wants to display simple and variable products on separate archive pages (because the simple ones can be dispatched right away, whereas the variable ones are custom-made and take a few weeks). I have tried out two ways to do this and both have issues.

    The first is that I created two categories – “in stock” and “made to order” – then duplicated categories (“dresses”, “trousers” etc) under each one. This makes navigation simple, but requires the owner to tick the right category box every time, which is tricky at speed as the two sets of categories look the same. Plus, sometimes I need to display both the simple and the variable products together, and unless the categories are identically named (and we got divergence almost immediately when the products started being uploaded) that can’t be done.

    So now I’m passing a query string on the url eg “?type=simple” and getting that on each page, which means tacking it onto all the breadcrumbs and all the links. As you can imagine, this is far from robust as someone browsing just needs to mess with that query string and the whole thing breaks.

    So I’m just wondering if there’s another way I haven’t thought of. Thanks.

    ### WordPress Environment ###
    Home URL:
    Site URL:
    WC Version: 3.3.5
    Log Directory Writable: ✔
    WP Version: 4.8.3
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: ✔
    WP Cron: ✔
    Language: en_US
    ### Server Environment ###
    Server Info: Apache
    PHP Version: 5.6.22
    PHP Post Max Size: 100 MB
    PHP Time Limit: 60
    PHP Max Input Vars: 1000
    cURL Version: 7.41.0
    SUHOSIN Installed: –
    MySQL Version: 5.7.17
    Max Upload Size: 100 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    ### Database ###
    WC Database Version: 3.3.5
    WC Database Prefix: lgjg_
    MaxMind GeoIP Database: ✔
    Total Database Size: 8.71MB
    Database Data Size: 7.09MB
    Database Index Size: 1.62MB
    lgjg_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB
    lgjg_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB
    lgjg_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB
    lgjg_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.05MB
    lgjg_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB
    lgjg_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB
    lgjg_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB
    lgjg_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB
    lgjg_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB
    lgjg_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB
    lgjg_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB
    lgjg_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB
    lgjg_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB
    lgjg_woocommerce_log: Data: 0.02MB + Index: 0.02MB
    lgjg_alm: Data: 0.02MB + Index: 0.00MB
    lgjg_commentmeta: Data: 0.00MB + Index: 0.00MB
    lgjg_comments: Data: 0.00MB + Index: 0.01MB
    lgjg_links: Data: 0.00MB + Index: 0.00MB
    lgjg_mgmlp_folders: Data: 0.01MB + Index: 0.01MB
    lgjg_modula: Data: 0.02MB + Index: 0.00MB
    lgjg_modula_images: Data: 0.02MB + Index: 0.00MB
    lgjg_ngg_album: Data: 0.02MB + Index: 0.02MB
    lgjg_ngg_gallery: Data: 0.02MB + Index: 0.02MB
    lgjg_ngg_pictures: Data: 0.02MB + Index: 0.02MB
    lgjg_options: Data: 4.35MB + Index: 0.08MB
    lgjg_podsrel: Data: 0.02MB + Index: 0.06MB
    lgjg_postmeta: Data: 1.56MB + Index: 0.44MB
    lgjg_posts: Data: 0.47MB + Index: 0.19MB
    lgjg_search_filter_cache: Data: 0.05MB + Index: 0.05MB
    lgjg_search_filter_term_results: Data: 0.02MB + Index: 0.05MB
    lgjg_termmeta: Data: 0.02MB + Index: 0.03MB
    lgjg_terms: Data: 0.02MB + Index: 0.04MB
    lgjg_term_relationships: Data: 0.05MB + Index: 0.10MB
    lgjg_term_taxonomy: Data: 0.02MB + Index: 0.02MB
    lgjg_toolset_post_guid_id: Data: 0.02MB + Index: 0.02MB
    lgjg_usermeta: Data: 0.02MB + Index: 0.02MB
    lgjg_users: Data: 0.00MB + Index: 0.01MB
    lgjg_wc_download_log: Data: 0.02MB + Index: 0.03MB
    lgjg_wc_webhooks: Data: 0.02MB + Index: 0.02MB
    lgjg_woof_query_cache: Data: 0.02MB + Index: 0.02MB
    ### Post Type Counts ###
    _pods_field: 23
    _pods_pod: 14
    _pods_template: 27
    attachment: 454
    customize_changeset: 6
    fabric: 138
    fabric_placement_opt: 11
    gallery_post: 21
    gallery-post-clothes: 1
    meta_data_filter: 1
    mgmlp_media_folder: 25
    ml-slide: 4
    ml-slider: 2
    nav_menu_item: 10
    ngg_gallery: 2
    ngg_pictures: 18
    option_photo: 10
    page: 15
    post: 5
    product: 47
    product_variation: 34
    product-clothes: 2
    pt_view: 6
    revision: 743
    search-filter-widget: 1
    shop_order: 2
    style: 15
    sub_posts_link: 2
    sub_posts_pt_link: 2
    uwpqsf: 1
    wccpf: 9
    wcp_carousel: 1
    wp-help: 3
    wp-types-group: 1
    ### Security ###
    Secure connection (HTTPS): ❌Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
    Hide errors from visitors: ✔
    ### Active Plugins (18) ###
    Bulk Images to Posts: by Mezzanine gold –
    Categories in Hierarchical Order: by Kamal Agrawal
    Amit Sonkhiya – 1.2
    Debug Bar: by wordpressdotorg – 0.9
    Enhanced Media Library: by wpUXsolutions – 2.5
    Pryde of Place Custom Functions: by Katherine Harkness – 0.1
    Limit Login Attempts: by Johan Eenfeldt – 1.7.1
    Log Error: by  –
    Pods - Custom Content Types and Fields: by Pods Framework Team – 2.7.1
    Lazy Load by WP Rocket: by WP Media – 1.4.7
    Shortcode Widget: by Gagan Deep Singh – 1.5.1
    Under Construction: by Web factory Ltd – 2.95
    UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
    DavidAnderson – 1.14.5
    Which Template File: by Gilles Dumas – 4.3.0
    Widget Options: by Phpbits Creative Studio – 3.6
    WooCommerce: by Automattic – 3.3.5
    WP Help: by Mark Jaquith – 1.5.4
    WP Log Viewer: by Maxwell Berkel – 1.2.1
    WP Super Cache: by Automattic – 1.5.9
    ### Settings ###
    API Enabled: ✔
    Force SSL: –
    Currency: GBP (£)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    ### WC Pages ###
    Shop base: #357 - /shop/
    Cart: #181 - /cart/
    Checkout: #182 - /checkout/
    My account: #183 - /my-account/
    Terms and conditions: #2157 - /terms-and-conditions/
    ### Theme ###
    Name: Storefront Child
    Version: 1.0.0
    Author URL: 
    Child Theme: ✔
    Parent Theme Name: Storefront
    Parent Theme Version: 2.2.8
    Parent Theme Author URL:
    WooCommerce Support: ✔
    ### Templates ###
    Overrides: storefront-child/archive-product.php
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support RK


    Have you considered using “Stock” a method to distinguish between the two? For the products that are available on backorder, you could set it to being “Available on backorder” whereas the items you have on hand are always “in-stock”?

    It might also be useful to display even more overt messaging to the user on the cart page to say that an item is hand-made. This can be done with:

    Thank you for your suggestions. I have no problem distinguishing between the simple and variable products. The problem is separating the archive pages. For example, I need an archive page for in-stock dresses and an archive page for made-to-order dresses.

    Plugin Support Hannah S.


    Automattic Happiness Engineer

    Hey there,

    The problem is separating the archive pages. For example, I need an archive page for in-stock dresses and an archive page for made-to-order dresses.

    You could manage this using customization to filter based on which products are in stock and which aren’t. However, I’d recommend an easier solution: why not create a product category for in-stock vs. made-to-order dresses? WooCommerce automatically creates a product category page for you, so then you can quickly show both types of dresses.

    Hi Hannah, thanks for your answer. I’m not quite sure how to implement your suggestion. My menu and site structure is as follows:

    Made to order
      - Kids clothes
      - Adults clothes
    In stock
      - Kids clothes
      - Adults clothes

    However, I can’t structure the categories like this, because the two lists, which ought to be identical, start to diverge too quickly when products are uploaded, and the user too easily selects a category in the wrong list when working at speed.

    I could have a separate product category (not part of the hierarchy) for made to order and instock, but that wouldn’t solve my navigation issues – it’s just a different way of identifying what’s made to order and what’s instock, which I’m currently doing by identifying simple or variable products. For example, if I’m on the made-to-order kids’ clothes page, all the category links need to go to category pages that only show made to order clothes. How do I do that without passing a query string in the url?

    • This reply was modified 1 year, 11 months ago by hansford77.
    • This reply was modified 1 year, 11 months ago by hansford77.
    Plugin Support Hannah S.


    Automattic Happiness Engineer

    Thanks for sharing that breakdown! This is one of those cases where there is no perfect answer – it’s going to be a question of finding the solution that works best for this specific situation.

    I am building a site where the owner wants to display simple and variable products on separate archive pages (because the simple ones can be dispatched right away, whereas the variable ones are custom-made and take a few weeks).

    Let’s take a step further back. The goal is to be able to show separate archive pages for products that are in stock, and then separate pages for those that need to be made custom. I’d recommend against having two separate structures that you have to maintain – that’s more work in the long run.

    Here’s how I’d do it:

    * Set up a single structure, i.e.the categories that you have under in stock, or custom.
    * Create a global attribute with two terms: custom and in stock (or possibly “ready to ship”). Assign each product one of the two terms. Once you’ve done that, you open up the possibility to filter dynamically.
    * On the shop page, add a product attribute filter, and set it to use the attribute you’ve just created. You’d be able to filter whatever products you’re looking at by if they’re custom or in stock.

    Thanks Hannah. What do you mean by a product attribute filter? Can I use that to show two different pages (that’s really what she wants), or would it be a filter on a single page (which is what I’d prefer and have suggested).

    Plugin Support Hannah S.


    Automattic Happiness Engineer

    I’ve included a link to the filter in the previous message. 🙂

    This would ensure that everything is on one page, with a filter – it’s semantically a lot cleaner, better for SEO, maintenance, etc.

    However, once it’s set up like this, you could also create custom pages – so if you wanted to show all dresses of type x, which are custom, then you could use a shortcode to show the exact products. You’d just filter on the categories and attributes.

    Sorry, I couldn’t see anything about filters on that linked page.

    I do agree everything would be better on one page. But that isn’t what’s wanted, sadly.

    I can see how to set up archive pages for particular categories and attributes, I’ve already done that. it’s the links to those pages that I can’t work out. For example, I’m on a single product page, and the breadcrumbs need to take me to the instock dresses page. Or I’m on the instock page, and the link to dresses needs to go to instock dresses.

    I appreciate your help; it seems what I need to do isn’t going to work.

    To make the whole thing much simpler it would be so much easier if I could just have a second custom post type for another sort of product, but I don’t think that’s possible with Woocommerce.

    Plugin Support Hannah S.


    Automattic Happiness Engineer

    Sorry about that, it looks like I sent the wrong link! You’d need the product filter widget, to be able to filter between in stock and custom products:

    Beyond that, though, I don’t have any further suggestions for you, beyond working with a developer to explore further possibilities. If you’d like to take that route, I highly recommend contacting one of the services on our customizations page:

    Thanks Hannah, I see what you mean now. I thought you meant a filter that was more upstream.

    I appreciate your help. I couldn’t think of another way either, just thought I’d put it out there in case anyone else could. I’ll have to stick with the query string then.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Different archive pages for simple and variable products’ is closed to new replies.