There are several hooks in get_the_post_thumbnail
for example
begin_fetch_post_thumbnail_html
end_fetch_post_thumbnail_html
/wp-includes/post-thumbnail-template.php
You could add a function to one of these actions which removes your filter on first run.
If you need further help with this please add some code how you filter the_content
.
Related Posts:
- Stop WordPress Wrapping Images In A “P” Tag
- How to get ‘post_content’ without stripping tags?
- How do you add thumbnail support for custom post types?
- Is there a action hook for the “Empty Trash” button?
- Function to execute when a post is moved to trash .
- add action only on post publish – not update
- Post featured image column on admin post list page
- Get content from one page and show it on another page
- Removing any and all inline styles from the_content()
- How to validate XML-RPC post creation and cancel when needed?
- Create posts on user registration
- Custom Field in Featured image for A particular post
- media_handle_upload for local files?
- How to disable content pagination?
- How to add/assign or change featured image in post programmatically?
- Modify ‘Read more’ link adding a new class
- How to publish a post with empty title and empty content?
- How to add a “publish” link to the quick actions
- Action hook ‘wp’ firing twice… why?
- Adding a div class or id inside the_content()
- How do I use element instead of tags in WordPress post content having webP support?
- VT-resize image and display it [duplicate]
- Divide Post content into separate divs for every 500 characters (or any other character counts)
- Count singular post views automatically
- Post content being duplicated by the_content();
- Posts Page Featured Image [closed]
- Showing Thumbnail from Previous and Next Posts
- Get the post_id of a new post
- Custom function for “Submit for Review” hook
- How do I programmatically add an image to a post?
- How to Replace the WordPress Featured Image with a Video?
- How can I extract the URL of a link from a post?
- Content editor creating blank paragraphs in spaces and creating   in the_excerpt
- How to add custom content (text/image) at start of content (IN content ie the same line)
- how “manage_posts_custom_column” action hook relate to “manage_${post_type}_columns” filter hook?
- Delete Post From Front-End and attachment permanently
- Remove Featured Image from posts in specific category?
- Retrieve a specific post’s featured image and show on a different page
- Only show featured image on exerpt and exclude images in post
- How to display Post title By ID and its Thumb Contents
- Adding if statement into the_content()
- Actions to use when flushing cache (when posts are added / deleted / modified)
- why my urdu text is not aligned properly when written in wordpress blog post?
- How do I display main query posts in random order using add_filter
- How to exclude native lazy loading from first image in post content?
- Delete media from the post but keep my featured image and post
- Is there a way to know when a page has been updated and do some action only once?
- Run a function when a custom post is update?
- How to limit wordpress the_excerpt() dynamically
- the wp_post_update isn’t working all the time
- Featured image error after importing blog posts
- Send email to user when I publish a new post
- Mysql update menu_order problem
- how can i take wordpress post as embed?
- Is update_post_meta used when save_post action hook is invoked?
- Set featured image as hero image on each page
- Thumbnails and images in the blog post are not loading
- Count singular post views automatically
- Blog featured images disappeared on my homepage
- post thumbnails error
- Display images of related posts
- Center crop the feature image
- Add another feature image box
- How to show category image if no featured image is set?
- How can i take all ids from untrash_post action?
- Grab meta data before post is saved
- if CPT content is empty then
- Set featured image on creating new post
- Display post on main page with thumbnail
- Find post tags words in post content and link them to tag URLs
- How to get all posts in gallery post format template
- Is it possible to completely replace a post with an action/filter?
- Add review box by function at top or bottom of content
- Hook To Get All Posts Deleted
- Add Image Before Posts Entry Title
- Showing content from WordPress ruins page CSS using WP_Query, without, content does not show
- Thumbnail With Next/Prev Links Not Showing Next Post?
- How do I get thumbnails?
- Latest news mini images
- Insert link to my thumbnail images
- thumbnail image path and file path for gallery thumbnail images
- Wanting to apply different featured images for each post
- Specific Post Format Image Thumbnail
- Assign custom class to post content images
- the_content() not displaying the full post
- Stripping tag from elements in post
- Post thumbnail is not shown in wp-admin
- Post thumbnail height problem
- Displaying warning if no featured image has been set – Post Editor
- How enter custom post meta or custom field on box post list archive page?
- $attachment->post_title not displaying title
- Action while post is being published
- How add class the_content();?
- Do anything on post_status change [duplicate]
- Import alt text in set_post_thumbnail
- website images getting corrupt automatically
- Changable favicon based on post-featured image
- Modify upload directory to use post category slug in file path on multisite installation
- Get featured image thumbnail and inserting into custom field on wordpress posts
- How to add publish button in menu All Posts (Wp-Admin)