Creating a hierarchical menu with non-hierarchical taxonomies

I have 4 separate location taxonomies in WordPress:


How would I create a hierarchical facet to replicate a hierarchical taxonomy such as [‘taxonomies.location.lvl0’ , ‘taxonomies.location.lvl1’] when the taxonomy is only related by the post the taxonomy belongs to?

Here is the code which displays the facet and filters by the top level (taxonomies.location_region) ok but breaks when selecting the second level (taxonomies.location_country).

      container: '#facet-job-locations',
                           separator: ' > ',
                           templates: {
                                header: '<div class="panel-heading"><h3 class="panel-title">LOCATION <span class="glyphicon glyphicon-menu-up pull-right" aria-hidden="true"></span></h3></div>'
                            cssClasses: {
                                body: 'panel-body',
                                count: 'pull-right'
                            collapsible: { collapsed: false },                 
1 Like

@bcorke Since you identified that something is clearly not working, could you replicate it inside a simple jsFiddle so we can work on that? Here’s a simple example to get you started:

Hello, did this get resolved? I have the same problem: I do get the list of results by top lvl filtering, but get no results found once I click on second lvl filter.

1 Like