Forums Forums Search & Filter Pro Custom Field search returns "No Results Found"

Viewing 10 posts - 1 through 10 (of 16 total)
  • Anonymous
    #109726

    Hi,

    I’ve set up a search form and all seems to be working great, with one exception–a custom field that keeps returning “No Results Found.”

    Here is our setup: 1) We are searching a Custom Post Type called classis_articles. 2) These posts contain multiple custom fields. 3) One of the custom fields is called classis_subjects. 4) Here we enter subjects such as “math,” “science,” “literature,” etc.

    I have this custom field set to be searchable via drop-down list on the search form.

    On the search form, you can see all the options for the classis_subject Custom Field. So, if you click on the drop down, which I have labeled “Subjects,” you’ll see math, science, literature, etc. and you can select them from the drop-down. The search form is pulling in the values for the classis_subject Custom Field just fine. But if you click on one of the subject options in the drop-down, and then click “Submit,” you get “No Results Found” even though there are many posts that should display.

    I am searching other Custom Fields on the same search form, also using a dropdown list, and they seem to be working perfectly.

    Thanks for any help you can provide!

    Stormy

    Trevor
    #109751
    This reply has been marked as private.
    Anonymous
    #109758
    This reply has been marked as private.
    Trevor
    #109765
    This reply has been marked as private.
    Anonymous
    #109784
    This reply has been marked as private.
    Trevor
    #109794

    I looked at A Quick Introduction to The Song of Roland by George Grant and I do not see Literature being ticked? Plus, I only see it once, unticked?

    Anonymous
    #109797
    This reply has been marked as private.
    Trevor
    #109805

    Sorry, I was looking at the wrong thing. I see it. But you have the field twice. It see the first one (with history in) but the second.

    I am not sure you can add multiple values that way. I never use the WordPress custom field function. I prefer to use ACF (which is free) and that allows multiple values via a multi select dropdown select box option.

    Anonymous
    #109825

    It sounds like your best guess is that I cannot use the same Custom Field more than once on a post, so there is no way to assign multiple values to the same Custom Field.

    For example, you can’t have “literature” as a value for the “classis_subjects” Custom Field, and then add that Custom Field again for “history.”

    Is this correct?

    Would you recommend trying ACF? Will that allow multiple values for a specified Custom Field, and then allow searching on those values using Search & Filter Pro?

    Thanks again!

    Stormy

    Trevor
    #109894

    Hi

    I would test what I said first. Find another post where two values have been added for the same custom field, and see if that post is found searching separately for each term.

    As to ACF, yes. It is far superior to the built-in WordPress custom field system. Beware not to use the same field names as you have already used though. You can use the same labels for data entry.

    And yes, it allows multiple entries for a single field, but it does so through a multi-select dropdown box, not text entry (stops duplicates from being entered also, as the user cannot make new terms in the post editor, they must instead be setup in the ACF field group definitions.

    ACF is very widely used and supported.

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