The article explains about uploading the images in post attachment. Now post attachment images are connected to our posts and will get when ever we needed . Here is the steps how we can upload it .
Before uploading the images, we understand that you have already logged in with ADMIN credentials .
Step-2: We need to select the option “Uploaded to this post” .
i)- Now when you will select this option then it will show all uploaded image i.e post attachment image in post.
ii)-Now if you are not uploading any images in previously then a screen will show for uploading the images.
Note : Now you can upload the multiple image.
Your work for uploading images on POST Attachment have been done . Finish .
How to call these images in Front end
Use the function :
get_posts with parameter :
post_parent= 'current_post_id', 'post_type'='attachment' then it will be get all the post attachment images.
$attachments = get_posts( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image' ) ); print_r($attachments); it will print all the images of the post attachment.
Now for more detailed, please visit on : codex.wordpress.org or you can leave a comment also . I will reply you soon.