Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Combine a keyword search with user’s choice of custom field values

Viewing 10 posts - 1 through 10 (of 22 total)
  • Howard Blythe
    #254232

    Hi

    I have a custom post type ‘xxxxxx’
    – each post has several ACF fields for displaying data

    The form and the initial view (of all XXXXX items) is set up on a custom template page

    The results go to the default search.php
    – where I separate out the XXXXX results from all other site’s results

    This works fine

    ——————

    I have now added a new ACF field ‘yyyyy-choice’
    – each xxxxxx cpt will have one of 10 choices
    choice one
    choice two
    choice three
    … etc…

    I now need to change this landing page to have a search/filter tool to combine two tasks.

    The visitor needs to find an item by keyword search from within a chosen selection of values from yyyyy-choice

    Possibly as a set of checkboxes underneath the main keyword search field
    – each checkbox represents one of the 10 values within yyyyy-choice
    – with a submit after this?

    ——————

    I would like search.php to then display all xxxx items that match those yyyyy-choice values

    i.e.
    search for ‘alexander’ within choice one … show 5 items
    or
    search for ‘alexander’ within choice one and choice four … show 10 items

    I have your Search & Filter Pro plugin
    – but I can’t seem to get this set up?

    If you could point me to a demo or information that I can work through

    Trevor Moderator
    #254272

    So, I expect to see a search form with the search text box and the options for that field, plus maybe a submit button. If this is a Post Meta field, I would expect it to be set like this:

    https://www.screencast.com/t/EqZ7jI4m

    Notice the Search Operator set to OR.

    If this does not work, are you able to send me a live link/URL to your search page so I can take a look?

    Howard Blythe
    #254276

    Hi Trevor

    I have screen grabs, links and a ZIP to help – but how do I get these to you?

    Trevor Moderator
    #254278

    Upload them to a file sharing site and share the links with me.

    Howard Blythe
    #254280
    This reply has been marked as private.
    Howard Blythe
    #254284
    This reply has been marked as private.
    Trevor Moderator
    #254332

    I see the error. In selecting the Meta Key name, note a ‘gotcha’ with ACF ….

    … it makes 3 meta keys per field, like this (in this example for a field named ‘land’):

    #1 _land
    #2 field_52f0fc4334f52
    #3 land

    In our Meta Key selection list, you need to use key #3, without the underscore at the start of the key name. If you choose #1 by mistake, in the field choices you will see the name of #2.

    Howard Blythe
    #254339
    This reply has been marked as private.
    Trevor Moderator
    #254341
    This reply has been marked as private.
    Howard Blythe
    #254343
    This reply has been marked as private.
Viewing 10 posts - 1 through 10 (of 22 total)

The forum ‘Search & Filter Pro’ is closed to new topics and replies.