Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › WC custom taxonomy and ACF Relationship field issue
- This topic has 4 replies, 2 voices, and was last updated 7 years, 8 months ago by
avanti.
-
AuthorPosts
-
October 7, 2018 at 4:16 pm #19419
avanti
ParticipantHello,
I can’t get ASP to work with a custom taxonomy and a custom field (ACF Relationship), both attached to WooCommerce products.
None of the terms of this taxonomy or custom field searched seem to be considered for outputting products.The ASP search engine is set to “Index table” and all the expected types and fields are set, at least i suppose… could be wrong.
For instance, let’s take the product “_Produit démo 1”
It has two terms of the “utilisations” (means “usage”) custom taxonomy:
- Intérieur
- Extérieur
And a value in its “produit_marque” ACF Relationship custom field: 3m
Searching “intérieur” or “extérieur” or “3m” in text mode doesn’t return the product in the search results.
Can you please help me setting this?
October 8, 2018 at 10:17 am #19425Ernest Marcinko
KeymasterHi,
Thank you for all the details, it helps us a lot!
I have made a few corrections on the index table configuration, namely I removed the acf-field and acf-field-group post type from indexing, as it does not affect the outcome. I have also applied this custom code to the bottom of the functions.php file in your theme directory, that may help with indexing the ACF relationship fields. Please note that by default that is not supported of indexing ACF relationship fields for compatibility reasons, but hopefully that custom code should do the trick.
The taxonomy terms were already indexed with the product, it was in the results list on the 4th page when searching for “Intérieur”. I have re-created the index so that the fields are also indexed, and did a test search for “intérieur extérieur 3m” to make sure it is working, and it looks like that did the trick: https://i.imgur.com/7QECFyB.png
The taxonomies and the relationship field (at least partially) should be indexed now.
I hope this helps!
October 8, 2018 at 11:52 am #19431avanti
ParticipantHi Ernest,
Great, it works now!
I’ll have to dig a little deeper in testing the output consistency from a user point of of view, but til now, i find the search tool really does the job.
Thanks a lot for your efficient and quick help, and the clear explanations.
October 8, 2018 at 12:21 pm #19433Ernest Marcinko
KeymasterYou cannot access this content.
October 8, 2018 at 1:45 pm #19435avanti
ParticipantYou cannot access this content.
-
AuthorPosts
- The topic ‘WC custom taxonomy and ACF Relationship field issue’ is closed to new replies.