Skip Navigation

[Resolved] Custom search on archive

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 9 replies, has 2 voices.

Last updated by info164 5 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1343671

Hi,

I try to create custom search in my archive page for yacht ( hidden link ).

Now I have loop:
<wpv-loop>

  • [wpv-post-body view_template="loop-item-in-prikazsvihjahti"]
  • </wpv-loop>
    And that look show yacht in a list and it's ok.

    How can I create search where user can choose yacht category, price, and other details that yacht have?

    For now I put just search field and it's works but when I type Katamara and hit submit (trazi) buttom, search result are correct but it's not look nice, I would like that search result look like my originals loop list of yacht

    #1343675

    Hi there,

    Thank you for contacting us and I'd be happy to assist.

    I'll need to see how this archive view is setup, to suggest the best way forward.

    Can you please share temporary admin login details?

    Note: Your next reply will be private and though no changes will be made on your website, please make a complete backup copy, before sharing the access details.

    regards,
    Waqar

    #1343963

    Hi,

    Thank you for sharing the login details.

    I've checked your WordPress archive view "PrikazSvihJahti" and noticed that the front-end search filters have been added, but are not showing on the front-end.

    This is happening because the content from the "Loop Editor" is incorrectly repeated in the "Output Editor" section.
    ( screenshot: hidden link )

    Please remove all content from this "Output Editor" section and only include:

    
    [wpv-filter-meta-html]
    [wpv-layout-meta-html]
    
    

    For more details around adding search filters in WordPress archives, you can visit:
    https://toolset.com/documentation/user-guides/front-page-filters/#custom-search-archive

    I hope this helps and please let me know if you need any further assistance around this.

    regards,
    Waqar

    #1343977

    Thanks!

    I show documentation but I can't edit filter, I wanna add some field (taxonomy filters but I can select Regije or Baza) why?

    #1344725

    Hi,

    The option to select taxonomies Regije or Baza filters are not available on the new filter selection screen, because they are already added.

    Screenshot - Query Filter section: hidden link

    If you want to add a filter for these taxonomies, from the start, please remove them from the "Query Filter" section and save the view and they'll become available to be included again.

    Note: when you'll delete any filer from the "Query Filter" section, please also remove its relevant HTML from the "Search and Pagination" section.

    Screenshot: hidden link

    regards,
    Waqar

    #1344797

    Hi,

    Thank you for help!

    I managed to make the search engine I needed.

    Could you tell me how I can add additional search fields but originally to be hidden and click on the "additional search" button to appear below these main fields.

    I am also interested in the calendar option, is it possible to create availability option (in my case yachts to have a calendar when they are available).

    regards,
    Marko

    #1345761

    Hi Marko,

    Thanks for the update and glad that the search is working now.

    > Could you tell me how I can add additional search fields but originally to be hidden and click on the "additional search" button to appear below these main fields.

    - To show search fields or any content in a collapsible container, you can use Bootstrap's "collapse" element:
    hidden link

    Example:

    
    <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapseAdditionalSearch" aria-expanded="false" aria-controls="collapseAdditionalSearch">
    Additional Search
    </button>
    
    <div class="collapse" id="collapseAdditionalSearch">
    <div class="card card-body">
    <div class="form-group checkbox-field-container">
    
    Content to show in a collapsible container
    
    </div>
    </div>
    </div>
    
    

    You can include the above code in the "Search and Pagination" section of the view and replace the "Content to show in a collapsible container" text with the code of fields which you'd like to hide initially.

    > I am also interested in the calendar option, is it possible to create availability option (in my case yachts to have a calendar when they are available).

    - I'm afraid, Toolset plugins don't include a builtin calendar view/feature. There are some plans to introduce this in Toolset and you're welcome to add your voice to this feature request through the form at:
    https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

    Meanwhile, any third-party plugin that includes a calendar-based booking/availability feature, out-of-the-box, can be used. The following article reviews some of the popular options:
    hidden link

    For future reference, please note that as per our support policy ( https://toolset.com/toolset-support-policy/ ), only one question or issue can be addressed through a single ticket.

    You're welcome to start a new ticket for each new question or concern.

    regards,
    Waqar

    #1361289

    Hi,

    I have create search with collapsible container but I have some bug, if I select one field or two, collapsible container close automatic so I didn't manage to select all the fields by the end. Here is a link : hidden link

    regards,
    Marko

    #1362453

    Hi Marko,

    When the option "Full page refresh when visitors click on the search button with input values auto-updating" is selected in the view's "Custom Search Settings", the search form needs to be refreshed, when any input value is changed, to update the available filters accordingly.

    And when this search form refreshes, the state of the "collapsible container" also resets.

    To avoid this, you can select the option "Full page refresh when visitors click on the search button" in the "Custom Search Settings" instead.

    regards,
    Waqar

    #1364157

    Hi Waqar,

    but if I select the option "Full page refresh when visitors click on the search button" in the "Custom Search Settings" instead than my search show any posible select options.

    Can I set somehow main search to be auto-update becouse than user can choose just sometning that exist, otherwise user can choose category X and that type Y and he will get resolut "There are nothing for your search resolt".

    regards,
    Marko