Suppose you haven’t modified anything to change the default content output, maybe this can help:
add_filter('the_content', function($content)
{
$content = preg_replace('~^<p><img([^>]+)></p>~i', '', $content, 1);
return $content;
}, PHP_INT_MAX);
Related Posts:
- Load post content into div with ajax
- How to get only text from wordpress post content?
- Show only posts with images and a fixed amount of posts
- Stop WordPress Wrapping Images In A “P” Tag
- Stop WordPress automatically adding tags to post content
- removing inline styles from wp-caption div
- Add custom Attachment Display Setting for images
- Get content from one page and show it on another page
- How to get Images included in Post
- disable WP automatically inserted line breaks after an image
- Strategy for handling hierarchical pages with empty parent content
- Find the post an attachment is attached to
- Delete the original big size image after upload and leave only 3 images crunched by media gallery
- Post slugs and images cannot have same name?
- Add existing images from Media Library in to custom gallery
- Replace image attributes for lazyload plugin (data-src)
- How do I detach images from posts?
- How to remove Nextpage tag inside posts text depending of utm_campaign
- Download external images if post is publish
- How can you make sure authors’ posts are longer than 250 words?
- How do I sort (order) the results from `get_children()`?
- upload image in a meta box
- Can I load posts via Ajax?
- How do I use element instead of tags in WordPress post content having webP support?
- What is the best / efficient way to get WordPress content by post id and why?
- JSON not valid after json_encode posts
- How to remove images from showing in a post with the_content()?
- Add default content to post (for specific category)
- Unattaching images from a post
- how to display post content without post image?
- How to wrap every image in a post with a div?
- upload featured image from front end using wordpress add media button
- Programmatically inserting page breaks
- How do I create Comma Separated list of attached image ids?
- Get post embedded image caption
- Hide parts of the post content on the home page
- Filter/Remove HTML Elements on all posts and pages
- how to grab first link in post… and of course call it
- Paragraphs removed when using get_post_custom()?
- Add an image box besides featured image?
- Remove image from post also removes photo from media library
- Limit function to specific post category
- Testing for post title in ‘if/else’ statement returns no content
- Post taxonomy from exif data
- Remove inline width from figure
- Same content shared between multiple posts?
- All my inserted images gets a link to the full image even if it is already full size image
- how load content as pop-up using ajax
- get custom image size
- Remove permalink from images when inserting into post
- Get all images out of the posts content
- how to replace embedded “full” sized images within a post with the “large” ones
- WordPress Theory Lesson – Image Columns within posts with alignment?
- how can I put an image in a post with original size
- Show featured image next to post-teasers in Genesis Framework?
- Get image from post’s gallery
- Image Insert into posts and pages not working after 3.2.1 update
- How to retrieve the postID in a “image_send_to_editor” hook function?
- Copying and pasting emoji in a wordpress post
- Why content_arr[‘extended’] removes paragraph tags?
- Comma separated all attached image ID numbers except featured image ID number
- Modify Image Source With The_Content Filter?
- How to display featured image without it appearing in post?
- Can I use images as anchor tags with
- Unautop / Sanitize content added to a post through a plugin
- Featured Image uploaded, attached and set but only appearing in the media library
- Load post attached images on a single page site with fancybox
- creating front end image uploader that uploads images as posts
- Errors when uploading images in WP 3.5
- is there a way to show the the post title after the image?
- How to get rid of shortcodes in post content once and for all
- Add Word Limit to Posts
- Format the Layout of Images In The Edit Post Textarea?
- Set size for attachments
- I have a site where attachments in the wp_posts table have guid values of guid, how did this happen?
- CSS: How can I show a photo beyond the template’s column, but contained within the browser window? [closed]
- Get all attachment by post excluding featured and content inside
- wp-cli post create & media import issues
- Show only one page link in content pagination
- Get attachments for posts that belongs to a specific category
- List all categories with featured image from post?
- Get all images in post and comments like Twitter before post title
- Issue where WP Featured Image will not display
- How would one change the default url structure of attachments?
- How to create new post content templates for my users?
- If statement to check if post has image
- How do I do a page break?
- How to get a post’s content? [closed]
- Gather posts into a cart/lightbox and share with another user
- Thumbnail Image to go in the post aswell
- Why does a published post only displays the title and not the content in the site? [closed]
- Remove Featured Image & All Media Uploaded to the Post
- What are the benefits of setting a “featured image” for a WP blog post?
- preg_replace not removed “class”
- Best Way to Add UnEditable HTML to Posts
- update image path with words starting uppercase to lowercase chars
- The_excerpt() doesn’t parse – how to change that?
- How to only publish posts with image in it
- Page and post loop same template
- Uploading images in custom post form