Forums Forums Search & Filter Pro Custom Search Elements

Viewing 10 posts - 1 through 10 (of 11 total)
  • Anonymous
    #224497

    I have a need to have a custom search element that is requested by a client. We are searching by locations and the client would like to mirror a small version of a map that we’ve already used in a non-search fashion elsewhere in the site.

    We have an ACF field already set up where the destination is placed in one of 6 regions. We use an SVG and clickable paths to trigger jQuery events and swap out info about those regions.

    Can you think of a way that I can link a click action and filter or interface with your form results?

    ALSO, in the same vein they would like to have a full calendar where a person can click a day and filter by events that only appear on that day.

    Destination and Events are both CPT.

    The plugin is working beautifully so far. Any help or thoughts is very appreciated.

    Anonymous
    #224498

    Also I would like to add that I’m aware I can populate these meta values in a select box but the client wants to go down the SVG map for now.

    Let me know if you needs links to further understand.

    Anonymous
    #224500
    This reply has been marked as private.
    Trevor
    #224552

    Hi Matt

    I cannot think of any way to do as you want (not that it might be impossible), but what you ask for is a long way outside the scope of our technical support. You are in to very experimental territory here I think.

    As you are using the Post Type Archive method, as the loop is run in the template (the if have posts while have posts part), you would need to build an array whilst running through the while part, and after that, but before the end of the if, output the map using that array you have just built. That will restrict the map to being after the results.

    Anonymous
    #224584

    Thanks for your comments. I might pursue a similar path. If I break any ground I will report back for the benefit of others.

    Trevor
    #224589

    Thanks for letting me know. I will wait to hear back from you.

    Anonymous
    #225184

    So I decided to use the native form elements for both region and calendar as I liked being able to specify a date range and multi select for region.

    The plugin works fantastically. Really stellar job.

    I am however running into another issue which I will describe here:

    If I am on the post type archive page I can filter by region (one or more ACF values) without problem. However if I add a category (custom post type taxonomy) in the mix the region filter seems to be ignored. I will put the links in a follow-up private comment.

    Anonymous
    #225186
    This reply has been marked as private.
    Trevor
    #225225

    I am wondering if this is because you have enabled OR for the Field Relationships, and more than one selection is possible in the taxonomy?

    Can you test if with the ‘Enable filtering on Taxonomy Archives’ set to OFF?

    I appreciate that this will impact the URLs, but I don’t think multiple selection in a taxonomy can be refected in the URL, so it fails.

    Anonymous
    #225235

    I tried ‘Enable filtering on Taxonomy Archives’ set to OFF and it seemed to have no effect on the results aside from altering the URL so I turned it back on. What seemed to fix it was changing the OR to AND in field relationships.

    I assumed that AND would not work for multi selection since each entry contains only one region value and would cancel out. I thought that OR would allow multiple selections that would pull in the selected regions but instead it made them irrelevant.

    I’ll have to try and wrap my mind around it later but it seems to be working as per my needs for now.

    Thanks!

Viewing 10 posts - 1 through 10 (of 11 total)