You can use post__not_in
to exclude the image by ID:
$images_query_args = array(
'post_type' => 'attachment',
'post_status' => 'inherit',
'post_mime_type' => 'image',
'post_parent' => $post->ID,
'post__not_in' => array(get_post_thumbnail_id())
);
Related Posts:
- Count the number of images uploded on the website
- How to paginate attachments in a secondary query as gallery?
- How do I exclude all images from a wp_query?
- get images attached to post
- post thumb nail
- query attachments of parent page if attachments of current page are smaller than …
- wp_query for displaying attachments with a tag
- WP_Query: attachment image in “full” size?
- Trying to use “Medium” featured image for custom post type on home page
- How To Query All Attachment Images Found In Post Galleries
- Some images not being returned with wp_get_attachment_image
- How to get image title/alt attribute?
- Broken? WP_Query and “attachment” as a post type
- Query posts only with featured image
- Programmatically get images by URL and save in uploads folder
- Get the first image from post content (eg.: hotlinked images)
- Is it possible to query all posts that don’t have an attachment?
- How to paginate wordpress [gallery] shortcode?
- How to find attachment by it’s name?
- How to get Page/Post Gallery attachment images in order they are set in backend using WP_Query()?
- Getting attachments by meta value
- Insert an image into a post by API
- Get attachment by slug
- In loop: posts have thumbnail AND other variables
- Adding Featured Image to Post programatically
- How to change _wp_attachment_metadata specific value in SQL?
- Get attached media only
- How can I get a different image size, if all I have is the link?
- Show prev and next post links for parent post of current image in attachment page?
- How to display images in related posts?
- Query sticky posts with thumbnails
- Retrieve featured image (thumbnail) url from multiple posts with one query
- Get image of latest post from taxonomies/categories
- WP Query search for attachments and their exact title
- Multiple instances of Featured Image Query
- Converting Attachment to Images?
- post thumbnail not showing up with shortcode
- Show selected images on top in Media Manager
- How can I query posts with newly uploaded images?
- How WordPress attaches its Featured Images with posts?
- Sorting By Custom Posts With Attachments
- Attachment changing page’s permalink – $post not resetting?
- How to fetch only media that was already attached to a post/page?
- getting post thumbnail within loop causes an error
- How to do meta_query for attachments?
- Get attachment by meta_key value
- WP_Query condition affects posts_per_page count
- Exclude featured image from attachment loop
- Site not getting correct featured image from my query
- Set size for attachments
- How to show optimized list of posts with all their attachment images
- Where to put meta Keys
- Retrieve posts using thumbnail id as meta key
- WP Query – Post Thumbnail
- How to create resized versions of images added with wp_insert_attachment
- WP_Query Attachment adds additional attachment count and need to link attachment to post url
- Better wordpress attachment query than this
- How can I check for a thumbnail in WordPress?
- how would i change post->ID to work correctly when querying pages?
- How to display the featured image for each post?
- Query posts only without featured image
- How do you import images from a URL in your post?
- Retrieve Image Attachments Getting Post Thumbnail Image First
- How to hide image-url if no attachment?
- Why having more than 10 clauses in WP_Query results in some outputs being dropped?
- wp_query get attachments in larger size
- Creating attachments archive in tags and categories
- How to add WordPress featured image via SQL
- Display all attached image of every post of custom post type and link to original post
- Ignore image urls in wp_query search
- the_post_thumbnail do 2 queries. How to optimize
- Insert images into wordpress post with a query
- Find only those galleries with images
- How to attach images that I “insert from url” into the post?
- Featured images loop for Orbit Slider
- How can I build a query that returns all attachments of a page and it’s children pages?
- how to put thumbnail below category’s title?
- get all images from the wordpress media library with link to the post they are associated with
- Custom image size not displaying with wp_get_attachment_image()
- How to echo images Urls from a wordpress post, that are relally in the post
- attachment_fields_to_save first parameter is null
- How to restrict add media library only to images of the same post family?
- how to get custom attachment url?
- WP_Query how to add a thumbnail to the first post from the last 5 posts?
- Change database image location for transportability
- WP query retrieve the src of attached image
- Featured Image as Background with Offset
- Troubles with code for upload a image
- How to force regenerate thumbnails in WordPress posts?
- Query All Attachments and Order by Parent Publish Date
- Display images with same specific value?
- Featured image not showing on page
- WP_Query for attachments without duplicating post_parent and displaying tagged image
- Using WP_Query to get attachment returns empty set
- Display First posts without the default featured image
- Pull Instagram images into an existing loop?
- Loop issues when creating custom query for media uploader
- How can I use an image from an external source without uploading it to the media library
- on attachment.php, how to display previous and next attachment links that follow the same order as a custom WP Query
- Display only posts with thumbnails