Any examples of Wordpress taxonomy, when used with instant widget hierarchicalMenu?

instantsearch
wordpress

#1

Hi - I’m using the Wordpress Algolia plugin to push data to the index. I have a post type “service” that has hierarchical taxonomy, which when pushed appears to be in the correct JSON structure that Algolia needs to work with:

  "taxonomies_hierarchical": {
    "service_category": {
      "lvl0": [
        "Cosmetic"
      ],
      "lvl1": [
        "Cosmetic > Injectables"
      ]
    }
  },

I’m just unsure how to output this into the widget itself, as per this documentation, this is what I tried based on documentation, but it’s not returning anything.

instantsearch.widgets.hierarchicalMenu({
  container: '#brand-list',
  attributes: [
    'taxonomies_hierarchical.service_category.lvl0',
    'taxonomies_hierarchical.service_category.lvl1',
  ],
});

Any pointers? Thank you :slight_smile:


#2

Hi there,

I recommend following our new guide for advanced customizations in Wordpress found here:

As mentioned in the link above:

Algolia offers a WordPress plugin with some admin configuration. While it’s easy to use, the plugin does not offer full-scale customization. It’s designed only to enable you to make small modifications.

Thanks!