How to do this in wordpress? get images if post title contain mention keyword and image title contain other mention keyword

I want to show images on my custom page but with condition. I mean if my post contain “Keyword 1” and image contain “Keyword 2” I want to show that images.

Now I have many posts that’s title contain “Keyword 1” and every that post contain many attachments but one attachment with “Keyword 2” so I want to show that attachments from all posts on one page that match the condition I mean post contain “keyword 1” and attachment contain “keyword 2” is that possible?

Read more here:: How to do this in wordpress? get images if post title contain mention keyword and image title contain other mention keyword

Leave a Reply

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