Search PDF from ACF Field Embed Content
1 month, 3 weeks ago #32928
I have checked the embed any document documentation for pdf, its working when I embed pdf within the content, but I need to use the pdf from a custom acf file. Can we able to do this ?
Same embed code if I use within content body and tick this option, its working.. and its searchable in search results.wpsolrKeymaster1 month, 3 weeks ago #32929
Do you mean ACF embedded files like https://www.wpsolr.com/forums/topic/search-in-all-acf-file-fields-by-default/ ?1 month, 3 weeks ago #32930
I only want to index a certain field, which has the pdf url.. not all acf fields..wpsolrKeymaster1 month, 3 weeks ago #32931
Unselect the “Index all ACF file fields”, then use the hook
WPSOLR_Events::WPSOLR_FILTER_GET_POST_ATTACHMENTSto control which field you want to index.
You can find a functional code example in /wpsolr-pro/wpsolr/pro/extensions/acf/class-wpsolr-plugin-acf.php
The code browses all ACF file fields of the post, but you can filter with the field you need.1 month, 2 weeks ago #32958
Thank you, working fine with this filter.1 month, 2 weeks ago #32959
How to show the matched words or lines in description, as currently theme search template is showing normal post content. how do we make it dynamic to show content from the matched file ?
You must be logged in to reply to this topic.