Using CustomPress Taxonomies to filter WooCommerce Products?

I'm using WooCommerce to set up a store to sell comic books and similar products. WooCommerce has Product Categories which work for setting the overall group (Comic Books, Graphic Novels, Manga, etc) but I want users to be able to filter down further within a broad category.

So, Comic Books would have a CustomPress taxonomy called "Publisher" which would have values like Marvel, DC, Image, etc. I'd like to have widgets on the sidebar that does similar and can work with other CP taxonomies (eg Age, Genre, Series/Crossover etc),

Thoughts?

  • Predrag Dubajic

    Hi VC Nickels,

    I did a quick test for this and plugins that allow custom taxonomy filter like this one https://wordpress.org/plugins/search-filter/ should work fine, here's an example from my test:
    https://monosnap.com/file/ZKJeJEHLs8LBgrnxXQmye4JwgUaTT0

    So I created custom taxonomy for products and used shortcode from that plugin like this [searchandfilter taxonomies="publisher"] in order to add the filter to my sidebar.

    One thing to remember is that WP by default doesn't allow use of shortcodes in widgets so you need to enable it by adding below code to your child theme functions.php:
    add_filter('widget_text','do_shortcode');

    Hope this is what you wanted to do :slight_smile:

    Best regards,
    Predrag

  • VC Nickels

    Thanks Predrag,

    I've seen a few plugins like the one you suggest. I've seen a few plugins that seem to b purpose built for adding taxonomies and fields to WooCommerce with the purpose of filtering but they themselves do not seem to actually offer filtering in in the plugin itself.

    I'd like to submit that the WPMU Dev CustomPress add a widget that references the CPTs, Taxonomies, and Fields created with it for filtering, as that seems to be a notable reason for it's use - especially for Taxonomies and Fields AND/OR give the option to include at lest the Taxonomies in the normal WordPress Category widget.

  • Adam Czajczyk

    Hi VC Nickels,

    While you can add custom taxonomies (as well as custom fields) to the WooCommerce products using CustomPress, you would still need to use some additional solution for searching.

    That said, I think it would actually be quite a cool feature for CustomPress - some widget or shortcode that would provide a filtering/searching capabilities. Therefore, I have moved this thread to our "Features and Feedback" forum and let's hope more Members of our Community will support that idea.

    If it gains more interest from other Members, our developers may consider implementing it in one of the future releases.

    Best regards,
    Adam