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
- removing inline styles from wp-caption div
- How to get Images included in Post
- Find the post an attachment is attached to
- Post slugs and images cannot have same name?
- 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()`?
- Can I load posts via Ajax?
- What is the best / efficient way to get WordPress content by post id and why?
- JSON not valid after json_encode posts
- Unattaching images from a post
- how to display post content without post image?
- How to wrap every image in a post with a div?
- Get post embedded image caption
- Hide parts of the post content on the home page
- how to grab first link in post… and of course call it
- Add an image box besides featured image?
- Limit function to specific post category
- Remove inline width from figure
- how load content as pop-up using ajax
- Remove permalink from images when inserting into post
- WordPress Theory Lesson – Image Columns within posts with alignment?
- 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
- Copying and pasting emoji in a wordpress post
- Why content_arr[‘extended’] removes paragraph tags?
- 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
- creating front end image uploader that uploads images as posts
- Errors when uploading images in WP 3.5
- 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
- How would one change the default url structure of attachments?
- How do I do a page break?
- Thumbnail Image to go in the post aswell
- update image path with words starting uppercase to lowercase chars
- Upload attachment from external site
- Benefits to using semantic HTML in post content? [closed]
- Get URL from all images in a post
- Disable posts generated from image uploads
- how to give multiple post thumbnails to a post
- Image behind the post’s title
- Show more than 200 images in one post
- Hide thumbnail if there is a gallery on the post
- Image on rss feed on post
- How to Featured content with images in home page?
- Where to insert the other site image url for our wordpress post
- select post preview image from nextgen gallery
- How to show a featured image inside a post in only 1 single category
- Hide parts of the post content after typing it’s name or searching it by category
- How to get the next and previous image title from attachment or gallery?
- Posts and Pages w. private visibility don’t show up in existing content
- definining own teaser text for post
- Aligning images in the wp editor not working. How do i get this to work in custom theme?
- unable to write to the database while uploading images
- How to get unmodified post content?
- I have inserted a post’s content in homepage.php by the post-id. The font isn’t matching with the theme. How do I change font of this content?
- Display image gallery if more than 1 image
- Post images are not displayed in media library
- Delete attached images from posts
- Center crop the feature image
- Schedule image post on download
- Add another feature image box
- ‘posts’ table should not store the absolute image path
- How to make an image appear as a thumbnail in the blog post?
- Set featured image on creating new post
- How do I set content in my pages so that it remains permanent while blog posts are added below?
- WordPress each user has each content for a page,how to do that?
- How can I alternate styling of images in a post? [closed]
- Add caption to thumbnails in content
- Adding div to WordPress page content
- Customizing individual images on posts
- Stop images from being displayed on the front-end of the site
- Update all images url imported from HTML pages
- Adding editable content above posts
- Custom template for different post types
- Correcting the content width when sidebar is inactive?
- Featured Images link to post parent
- Post thumbnail dependant on category
- Latest news mini images
- How can i show only 30% of the “the_content(“More…”)”?
- How do I insert a custom field in a user submitted post?
- Only show posts with image and the correct ammount of posts in loop
- jquery: getting contents of #content field on post page
- Extra Theme – Fit image inside of Featured Post Slider
- Stripping tag from elements in post
- Get attachment if matches a variable
- Full width images within post content
- wordpress pinboard theme [closed]
- Automatically search and replace link in content (pages/posts)?
- Download button under all images WordPress