get images attached to post
It’s better to use get_children than get_posts. Here is a quick example that will work. This is in the form of a function that is defined in your plugin or in functions.php then use the function as a template tag. /** * Gets all images attached to a post * @return string */ function wpse_get_images() … Read more