0

I'm new to WordPress and I'm trying to target specific parts of the content.

I understand how to grab the title with get_title()is there something similar for images?

0

That depends.

There is the_post_thumbnail which will echo the "featured" image and get_children can grab all attachments.

Certain kinds of images aren't attached though, so you can't easily get those.

Reference

http://codex.wordpress.org/Function_Reference/the_post_thumbnail
http://codex.wordpress.org/Function_Reference/get_children

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.