How can i check whether a post contains an html tag or not. suppose someone has posted an image on the post to i want to see on if the post contains an
<img> tag similarly if there is a link so i want to check for the
<a> tag. So is there some way i can achieve this so i can perform actions based on whether it has a particular tag or not.
I tried the has_tag() function but then realized that i refers to the wordpress post tags and then i tried to use the has_term but couldn't figure out how to work with it or maybe it's not the right function as well.