Support » Plugin: Ajax Search Lite » Missing custom fields

  • Resolved samkallkwik

    (@samkallkwik)


    Hi, we are trying to configure Ajax Search to work to search custom fields. When we scroll down to select the custom fields on Sources & basics and type in our custom field label/name it isn’t coming up in the results. Is there a reason it’s not pulling there?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author wpdreams

    (@wpdreams)

    Hi,

    There are thre possible reasons:
    – The field does not exist
    – The field you are looking for is not actually a custom field (post type meta), but something else
    – ..or there is no value yet associated with the field yet (it is not been used yet). In this case, whenever you create the first post, which uses the field value, it will show up in the list

    The third reason is usually the most likely. In case of using ACF or PODs, you can create new fields, but the plugin can not see them unless they have been actually used, because until then there is no record of it in the wp_postmeta table.

    Best,
    Ernest M.

    Thread Starter samkallkwik

    (@samkallkwik)

    Hi Ernest,

    Thanks for your response. I have gone through your checks and confirm the field definitely exists. It’s an ACF text field that has over 1000 entries in the postmeta table. There are two other similar fields in the database which are set up in exactly the same way (only different names) and the plugin finds these with no problem.

    Thanks,
    Sam

    Plugin Author wpdreams

    (@wpdreams)

    Are there any results for it when you search for it in the options? Or are there no results for it at all? (I mean when looking for the field)
    That search shows only the first 10, 20 or 25 matches (I don’t remember exactly), so if there are more matches than that, it might be the reason it is not showing up.

    Best,
    Ernest M.

    • This reply was modified 3 months, 1 week ago by wpdreams.
    • This reply was modified 3 months, 1 week ago by wpdreams.
    Thread Starter samkallkwik

    (@samkallkwik)

    Yes, there are results showing in the options when I do a search, however, not the exact match for the field I want to include. Perhaps it isn’t showing up then as it is limited to only the first 10 results. Is there a way I can increase the number of results shown here or do an exact match search?

    Thanks,
    Sam

    Plugin Author wpdreams

    (@wpdreams)

    Well, the only way for now is to make direct changes to one of the core files:

    Before you start, make sure to have a full site back-up just in case.
    1. Open up the wp-content/plugins/ajax-search-lite/backend/settings/class/wd_cf_search_callback.class.php file on your server
    2. Replace the contents with this
    3. Save

    After the edit, the search should return at max 100 items, including the one you are looking for.

    Best,
    Ernest M.

    Thread Starter samkallkwik

    (@samkallkwik)

    Ah ha! Yes that was exactly what I needed. Upping the 'limit' => 100, flag enabled me to scroll down far enough to find the field.

    Thanks for the help.
    Sam

    Plugin Author wpdreams

    (@wpdreams)

    Great 🙂

    I will keep this edit for the upcoming release to make sure this issue is resolved permanently.

    I will mark this as resolved then.

    Feel free to rate the plugin if you like it, it is greatly appreciated.

    Best,
    Ernest M.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.