Try adding this to your functions.php – it will wrap the image in the div you want.
function filter_image_send_to_editor($html, $id, $caption, $title, $align, $url, $size, $alt) {
return '<div class="post-page-image" id="image-'.$id.'">'.$html.'</div>';
}
add_filter('image_send_to_editor', 'filter_image_send_to_editor', 10, 8);
Related Posts:
- How to extract images of post and pages excluding header and logo image in wordpress?
- How to change ID of an attachment in wp_posts and its related tables correctly?
- Bulk Image Uploader to create new post from each image [closed]
- Get the url of the full sized attachment image using post ID?
- Adding Attachment Display Settings in custom media frame
- Redirect to another page using contact form 7? [closed]
- How can I automatically download all images from all imported posts, place them on my new host, and replace all the links
- Copy/paste local images not working in WordPress
- How to wrap image tag into div for post only?
- How to force regenerate thumbnails in WordPress posts?
- Retrieve post thumbnails
- WP galleries in posts after import. How do I do it?
- With W3 Total Cache when I publish a post it does not appear in the homepage. Only if i purge all cache [closed]
- Images not showing after changing wp-content folder name
- Preview featured image using frontend post plugin
- How to add an image from web-link?
- The problem with WordPress Importer
- Cron job not firing
- How can I implement an Add to Collection function on my Image Gallery to be downloaded later?
- Solutions to repost categories into multisite blogs?
- How to enable qTranslate languages tabs in custom plugin page
- How do I “get the next 10 posts after post_id == x”?
- Hiding posts – WP Hide Post not working
- How to Delete all Unused photos Function
- How to resize images due to container width automatically server side/without CSS
- Set featured image randomly from WordPress Database on post submission
- Howto accurately position images with maximum flexibility?
- submit posts by unregistered users in wordpress
- Calendar Solution: Handling upcoming Dates with Posts?
- get_post_type on post.php
- Is there an easy way to flag posts in the admin area?
- Show an image in my header.php
- finding whether request is for post, and post id
- How to create a managed image repository in wordpress
- Any built-in function to associate a post to category through a plugin?
- How to hide some section in WordPress under Post
- Display post lists in 2nd paragraph
- Can’t delete Draft Post [closed]
- Matching Chapters to a Custom posts [closed]
- WordPress comments not appearing in blog posts, likely because of Redux template. Could I fix this with a plugin that adds a comment form as a block? [closed]
- How can I restrict image upload dimensions for non-admin WordPress users?
- WordPress display breadcrumbs using Yoast plugin [closed]
- Outbound link autometic converted into linkdirect , and not opening
- Display by Category in Admin
- Preg Match All doesn’t Allow echo first character for WordPress Taxonomy Tags
- wp_generate_attachment_metadata is creating an empty array
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- Force media library editor to overwrite the original filename?
- Two problems on my WordPress installation [closed]
- posts comments goes to trash
- Contributive page where people logged in can write
- Contact Form 7 Get Image Function [closed]
- How generate 200% image size and save with suffix @2x
- Load external images via proxy
- Excerpts on category page
- Bulk edit WP posts to update embeded images with new alt tags
- How to pull email and name from Flamingo plugin
- Which widget to use for display category post with view more? [closed]
- How to upload WordPress Images to remote web server and display those images in WordPress gallery [closed]
- External RSS feed to WordPress Portfolio
- Add padding while generating thumbnail
- Trying to fix form resubmition with PRG (Getting error: Cannot modify header information – headers already sent by)
- Can we have an ‘Update metadata’ button in Image Gallery for all image instances?
- Display wordpress post’s in popup?
- Retrieving Meta from Image Attachment
- Add ALT attribute to Pin It Button image to pass HTML5 validation
- Unable to add TAB character to post?
- Make change in media library affect images in published articles
- how to add text to posts from tags
- Adding (image) caching to my Tumblr widget
- How to upload multiple files/images when developing a wordpress plugin?
- Image Manager Plugin [closed]
- Implementing an image hosting website using WordPress? [closed]
- Add category selection to custom post type (plugin)
- Bulk Image Upload And Rerrange Functionality
- Would Gutenberg be considered a PlugIn?
- How to apply lazy loading in background images [closed]
- pagination on data fetched using SQL query
- How to delete all trashed item in one-go
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- Woocommerce showing images blurry in description page
- How to get the first post and second post in a wordpress blog?
- Is it possible to send blog posts via email to subscribers?
- Custom setup of wordpress comments that are displayed
- Slider/text combination plugin
- Is there any plugin which can paste a common content to my every post?
- Plugin to hide image in excerpt
- Recent posts per category loop?
- ‘Organize Series Plugin’ as muti author feature
- Import Instagram post to WordPress blog post
- Problem of encoding characters (apostrophes) in my posts publications
- How to backup single post in wordpress [closed]
- Image change on hover
- How to write “alt” tag in image for wordpress code?
- How to get all posts belongs to a user between a certain date
- Adding Static Image to WooCommerce Content-Single-Product template
- How do I get a post author’s image/avatar via RSS from another blog?
- How do I publish portfolio items with a future date?
- In Woocommerce theme need to add custom external link [closed]
- Getting taxonomy images to display on single-post with their terms