Search PDF from ACF Field Embed Content
- prakashreddy.imduriParticipant1 year, 7 months ago #32928
Hi,
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 year, 7 months ago #32929Do you mean ACF embedded files like https://www.wpsolr.com/forums/topic/search-in-all-acf-file-fields-by-default/ ?
prakashreddy.imduriParticipant1 year, 7 months ago #32930I only want to index a certain field, which has the pdf url.. not all acf fields..
wpsolrKeymaster1 year, 7 months ago #32931Unselect the “Index all ACF file fields”, then use the hook
WPSOLR_Events::WPSOLR_FILTER_GET_POST_ATTACHMENTS
to 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.prakashreddy.imduriParticipant1 year, 7 months ago #32958Thank you, working fine with this filter.
prakashreddy.imduriParticipant1 year, 7 months ago #32959How 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.