Pull post image worpress

0
Hello, I'm developing a blog on my site, and I added inside the post an image through the media insertion, however, I would like to know how I pull this media image through the code to insert the same image elsewhere.

Example:

I would like to insert above the text creating sites on Big Beach. I've been really researching, I'm not doing a soft body, but I still could not find anything or did not do the research as it has to be done, I'm waiting. Thanks in advance

    
asked by anonymous 12.04.2017 / 17:59

1 answer

2

To display images within the loop of wordpress, you can use the_post_thumbnail() .

If you just want to get the image of a particular post out of loop , use the get_attached_media() function, where the first parameter is the media name, audio , image and etc, and second the ID of the post.

    
12.04.2017 / 18:18