• Resolved alexmanchev98

    (@alexmanchev98)


    Hi Anders,

    Thank you so much for yet another amazing theme!

    Is there a way to have better filtering? For example by selecting multiple categories when filtering or filtering by category + tags?

    If not – could you guide me towards what would be a good way to achieve something similar?

    Yours,
    Alex

Viewing 1 replies (of 1 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @alexmanchev98,

    Glad you like it!

    I think it’s a bit above and beyond what most people need for their filtering, so I doubt I’ll ever add it to the Eksell itself, but it should be possible for child themes to add (with quite a bit of trickery). In short, you’d need to:

    • Plug the function that outputs the filter menu, eksell_the_archive_filter(), and change the output to be checkbox based instead of link based, so multiple items can be selected.
    • Short-circuit the eksell.filters JavaScript function, and replace it with one that looks for multiple active checkboxes rather than just one clicked link.

    That’s for multiple selected terms in one taxonomy. To support multiple different taxonomies (categories and tags, for example), you’d also need to plug eksell_ajax_filters() (which queries based on the selected filter) to modify the contents of the tax_query so it sends in an array with taxonomies and terms. That would be a bit more messy.

    — Anders

Viewing 1 replies (of 1 total)
  • The topic ‘Advance Filtering’ is closed to new replies.