Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Index doesn't find all Custom Fields from "GeoDirectory"
This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko 2 years, 1 month ago.
- AuthorPosts
- February 19, 2021 at 11:37 am #31683
Hi Ernest!
I struggle indexing all Custom Fields from GeoDirectory. some custom fields are found but most of them are not. I even use those custom fields in the global-divi-builder so I know that they (should) work but when I am trying to Index most of the custom fields, AjaxSearchPro is telling me that it doesn’t find any of the fields. Here is an example:
List of fields: /wp-admin/edit.php?post_type=gd_jobs&page=gd_jobs-settings
Link to AjaxSearchPro index: /wp-admin/admin.php?page=asp_index_table
Link to AjaxSearchPro custom fields: /wp-admin/admin.php?page=asp_settings&asp_sid=9#303
This shortcode displays this frontend: /jobs/What I am trying to achieve in the frontend is to have a location selection and the following fields:
– x
– y
– Category (this is already implemented)February 19, 2021 at 3:28 pm #31693Hi,
If the fields does not show up in the list when you are searching for them, that means they simply does not exist for sure in the wp_postmeta table. There are multiple reasons that could happen:
1. if the field is not in use yet: no values have been assigned to it on a post/post type object. Once there is at least one post/cpt with a field value it will show up
2. the actual field name is different from the label name
3. the field is not actually a post meta field, but stored in a different tableIn case of issue 1. you start using the field, and it should appear sooner or later. With issue 2. you may have to look around or ask the developer if there is a way to get the actual post meta field name. In ACF for example you can see the “slug” field, which is actually the custom field name.
Best,
With issue 3. there is nothing we can do unfortunately – if the values are stored extrernally there is no way for the plugin to access them.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 19, 2021 at 5:11 pm #31701Thank you for your reply. Are you sure about the wp_postmeta? Because i wasn’t able to find anstellungsform inside it when i opened phpmyadmin and it still was found in ASP
February 20, 2021 at 9:02 am #31709Yes, I run a test query via FTP on the back-end to make sure it is not a mistake.
The query executed via the database handler was:"SELECT DISTINCT(meta_key) FROM nhvgy_postmeta WHERE (meta_key LIKE '%%anstellungsform%%')"
and there was only one result for that:
array(1) { [0]=> object(stdClass)#34666 (1) { ["meta_key"]=> string(21) "field_anstellungsform" } }
Which is the field name
field_anstellungsform
It appears to be correct, the field search query returns the same. Try running the same query on phpMyAdmin, and it should return the same result as well.You can however enter whatever you want to the field name input, the search feature is only there to help you to find existing fields.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 23, 2021 at 10:39 pm #31761GeoDirectory just replied with their support. This is what they said:
“it’s n 3. Custom fields are store in custom DB tables for scalability purposes.”
So my question is now: What can I do now? What are my options?
February 24, 2021 at 9:24 am #31770Well that is very unfortunate. There is not much we can do about that. To access data from an external DB table and use them for filters – that needs major customizations, both on the front and the back-end, as well as the queries need to be implemented etc..
Best,
You can try asking a developer, but it might be cheaper to simply create a completely custom made plugin for this exact purpose.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.