wordpress search by attachment title

Funny enough, there many search enhancement plugins for wordpress, but It seems none of them can do what I want : return posts if one its child attachments matches the search query. It's easy enough when you think about it but the code below will save you the hour I spent looking for it on google .

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *