Search in posts’ attachments: title, caption, description

Question

I have seen variations on this question here and some have pointed to this solution (which doesn’t work and is apparently syntactically incorrect as well).

I have also seen people ask about searching in the content of PDFs, or returning a list of attachments, and none of this is what I want. I want the search to just return pages and posts, like it normally does, but I want it to identify what media is attached to a page or post, and then search through the titles, descriptions and captions of that media.

If there’s a match, I want the search results to just return the post to which the media is attached, not a link to the attachment page or anything like that. How do I do this?

0
3x5 8 months 2021-12-29T19:24:39-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse