I would like to make an if statement that tests if a post has images in them. If they do I want them to do one thing and if not I want them to do something else.
Can someone guide me in the right direction?
I would like to make an if statement that tests if a post has images in them. If they do I want them to do one thing and if not I want them to do something else.
Can someone guide me in the right direction?
You must be logged in to post a comment.
that’s the quickest way to do it, may not be 100% accurate thou.
Why not just use the built in featured image functionality?
I ended up using:
catch_that_image()
is a custom function I found that displays only the image from a post.