Adding a custom taxonomy widget to Faster Woo Widgets

Dave Hilditch
Talk to me

Note: Faster Woo Widgets has been renamed to Super Speedy Filters and a lot of progress has been made since this article.

Our Faster Woo Widgets upgrades have been in beta for a while now – the latest beta version of FWW has many improvements to help you make your WooCommerce store stand out from the crowd.

So far, the beta version includes more speed boosts, SEO optimisations to allow complete control over canonical URLs, noindex, nofollow and which pages get indexed by Googlebot and extra filter options like ‘show in stock’, ‘show on sale’, very pretty permalinks (including complete control of your permalinks) as well as many other nice things.

To learn more, you can view the full changelog for the beta version of Faster Woo Widgets.

Woo Brands and Yith Brands (amongst others)

It’s always been possible to add brands with FWW, provided they are not hierarchical – i.e. currently, with FWW you set up an attribute as a brand.

This is not great for everyone – firstly, many users have brands already configured, some have hierarchical brands, and many also like the brand landing pages created by these third party plugins. Since it was technically possible already to add brands with attributes, this feature didn’t get top priority, but I am focusing on creating it now.

Custom Taxonomy Filter Widget

The focus of this dev cycle is to get a new Custom Taxonomy widget added to our Faster Woo Widgets plugin. The default taxonomy you will be familiar with is the ‘product category’ taxonomy. You’re probably aware that categories are naturally hierarchical, and in Faster Woo Widgets you can filter on the category, retain search while changing category, have the category as a removable filter in the Existing Filters widget and a whole bunch of display options including different widgets to show the current hiearchy children or the top level hierarchy.

The new custom taxonomy widget will include all of these features – I’ve examined both Woo Brands and Yith Brands as well as some other lesser used ‘brand’ plugins (and theme features), and they all use a custom taxonomy to represent the brand.

Of course, it’s possible to create other taxonomies too in WooCommerce, and this new widget will also allow you to filter them.

Customer-driven development

This feature request has been requested in a number of forms, which is partly why it’s now top of the pile. With the completion of this widget, I’m aiming to be able to complete and close the following feature requests:

There is quite a bit of coding and testing to be done to get this working – I’ve itemised the items in this Trello card:

Open Discussion

If you wish to discuss this upgrade you can comment below, or on the Trello card, or on any of the suggestions links above.

Show all Most Helpful Highest Rating Lowest Rating Add your review
  1. Just a quick update that all reported bugs have been fixed in beta 2.40. There is still more testing to happen, so more bugs may turn up, but so far it’s looking very good.

    Quite a few extra features because of this custom taxonomy – for example, you can add the custom taxonomy terms to your SEO titles, shop titles etc, and you can even use our ‘Inline Filters’ option to include clickable filters beneath your product (configurable) which show you the value for that product and provide a link to view other similar products.

    For example, products with ‘brands’ set, you can choose to show ‘brands’ inline, then any product with a brand will have an extra hyperlink beneath it allowing you to filter to only show the brands of that specific product.

    Next I’ll be finishing the testing, confirming no more bugs, then as much documentation as I can, then this will all be released to core.

  2. Thanks for all the work you putting into this awesome plugin! Definitely the best option on the market currently! How much longer do you think it will take to reach a stable release?

  3. A little update on this:

    The custom taxonomy is pretty much ready with only a couple of things left that really matter:

    There is a bug preventing taxonomy titles appearing and I haven’t implemented URL rewrites for /brand/pedigree/ yet – but I have implemented /pedigree/ – so, remove the base from the custom taxonomy in FWW Settings page and you can see this all working.

    I’d love your help to test this, especially if you have a dev/test server with Yith or Woo Brands or any custom shop taxonomy – the latest beta is 2.34 updated 5 minutes ago. If you do install it (from your account -> downloads):

    1) Visit Appearance -> Widgets, add new custom tax widget, choose the taxonomy and any other stuff you want (the tax base field is not properly used yet, so you can ignore that)

    2) Visit Settings -> FWW, scroll to the Remove /product-category/ prefix section and you’ll find your taxonomies – you can re-order them and you can tick the box to remove the permalink prefix (e.g. remove /product-category/ or remove /brand/) – make sure to tick that just now since I haven’t implemented the rewrite rules for /taxonomy/* yet

    That’s it – visit your shop and test. I’m adding items to my testing checklist to try and make sure nothing falls through the cracks – if you find any issues, let me know – I’m probably most worried about behaviour here:

    * Single product page where product has multiple taxonomies

    * Product tag archives

    * Brand/custom tax archives (e.g. woo brands, yith brands – specifically I mean the extra archives these plugins create like the A->Z list of brands and where those clicks lead to)

  4. I think I need a better name for the ‘Reset/Do not reset filters’ option in the category and custom taxonomy widgets.

    If you have reset chosen, all categories will always display, and the product counts will be the full product counts for those categories.

    If you have donotreset chosen, only the categories which match your other selected filters or other selected taxonomies would be shown, and the product counts would be reduced.

    For example, if you were on /shirts/white/, with donotreset chosen then only the categories with ‘white’ items would be shown, and the product counts for those categories would show the number of white items in that category.

    I don’t think “Reset filters” or “Do not reset filters” captures this functionality properly – if anyone has ideas for what to call these two options let me know.

  5. This bug will also be fixed in this sprint:

    I’ve updated the Trello card with more findings, thanks in part to @twardy.

    In particular, this feature add-on will:

    1. Retain your existing brand pages (or whatever custom tax slug you have)
    2. Allow complete control over the URLs – the slug, whether a slug appears or not, and which of the various slug combos is the canonical.

    To explain, here are some URL examples with the product brands custom taxonomy – here I’m using ‘shirts’ as a product category, ‘white’ as a product attribute, and ‘adidas’ as a custom taxonomy (in this case a brand custom taxonomy):

    All of these URLs would be allowed:

    • /product-category/shirts/brands/adidas/white/
    • /shirts/brands/adidas/white/
    • /shirts/adidas/white/
    • /brands/adidas/
    • /brands/adidas/white/
    • /brands/adidas/shirts/white/
    • /adidas/shirts/white/

    In the widget settings, I’ll allow users to configure the /brands/ slug, and in the FWW settings page I’ll allow users the same control currently available for product categories – i.e. you will be able to remove /brands/ from the canonical URL so /adidas/ works as well as /brands/adidas/ but the /brands/adidas/ would have a canonical URL pointing at /adidas/.

    Now with the addition of additional taxonomies, users will also need a way to order the taxonomy slugs, so I’ll be adding that in too – it’ll use a similar kind of drag and drop config as I’m using for attribute ordering, but in the case of taxonomies, slugs would always be used – with attributes, it can be either slugs or attribute key/value pairs.

    e.g. if the user has both a brand taxonomy, the settings page will allow them to configure if the canonical should be /adidas/shirts/ or /shirts/adidas/

    The good news is that last years work on refactoring the code to use a Link class makes this all a *lot* easier – that class will handle everything relating to:

    • Generating the correct URL for the sidebar for links to that filter – e.g. on the /shirts/ page either linking to /adidas/shirts/ or to /shirts/adidas/
    • Generating the canonical URLs
    • Deciding whether the on-page meta tag should be noindex – sometimes bots will make it to a nofollow link – and with FWW you can have a page be indexable and yet have a different canonical, or you can have it not indexable with a different canonical or any combo.
    • Deciding whether the links should be nofollow in the sidebar or product links – this will work with the other generic rule of “Minimum products required to index” but I’m thinking custom taxonomies don’t need to be included in the “Total maximum attributes in canonical” setting or the “Maximum values per attribute in canonical” setting.

    If you have comments on any of this, let me know in the comments.

  6. I’m happy to see you’re still working on FWW. It’s definitely my favorite plugin of its kind, mainly because it’s the most SEO-friendly.

Leave a reply

Super Speedy Plugins