So $img->post_excerpt
is your content. It is the attachment’s caption field. You must change the images’ captions attached to the post with the id 54
in order to see any changes , if I understood the question right.
ADD:
Also attach the images to the post.
Related Posts:
- Turn a URL into an Attachment / Post ID
- Where is the old post permalink slug stored?
- Delete post with all files attached to it
- Is it possible to Schedule Attachments in WordPress?
- Find the post an attachment is attached to
- How to Group Posts by the First Letter or Number?
- Use an attachment in multiple posts
- delete post also attachments
- How are terms connected with posts in database?
- Replacing all attachment links in post with media file link
- Moving WordPress to new server: no posts found
- How can I export WordPress posts’ attachments?
- How to remove images from showing in a post with the_content()?
- How do I create Comma Separated list of attached image ids?
- Limit amount of results returned
- Sanitizing `wp_editor();` Values for Database, Edit, and Display
- Insert posts in two tables
- post_parent is 0 when uploading new files
- Instead of submiting an entire post, is there any way to submit a lite-post or a simple message?
- Syndicated Posts when Updated Lose HTML tags
- Easy way to delete 70k posts and attached media?
- Post update RSS notification plugin
- How much of my site can I recover from public_html?
- Reset/Reorder posts ID in the MySQL wp_posts table
- How to access featured image?
- Most recent post from another database
- Image Insert into posts and pages not working after 3.2.1 update
- What structure should post_content have in the database?
- How to delete all the content of a wordpress site without deleting the Post and pages?
- Load post attached images on a single page site with fancybox
- Extracting post categories
- Insert woocommerce products programmatically with featured image and gallery
- Set size for attachments
- Get all attachment by post excluding featured and content inside
- Prevent Delete Attachment by URL or When Submit
- Get attachments for posts that belongs to a specific category
- Automatically attach image to post if they have the same title
- Copy post to separate database with “add_action(….)”
- When open add new post or page WordPress add post with ID=0 continuously [closed]
- Anyone know why wordpress converts some html entities to their numeric equivalents?
- Remove a shortcode from all WordPress posts
- What do these phpMyAdmin errors mean on my WordPress databaes?
- What happens if I delete all the rows that represents a post revision from the posts table into WordPress database?
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- Delete all drafts?
- Is it possible to use WP_Query to only pull posts with attachments?
- Get posts and include taxonomy term
- Why my wp_posts data is so huge?
- Add field to user meta table in database when link is clicked
- How safe is it to delete old posts edits to save database space?
- Get attachments only for this post
- Upload attachment from external site
- Delete post revisions only for a single post
- wp_posts table extremely large
- How to Assign / Move all Deleted post to a category
- Saving Post Data in Another Database
- Restore woocommerce orders
- Get images from the post
- Import custom database into wp and keep the post id
- why the posts queried from sql is more than those showed on the page?
- Moved to a new server, backup was a day old and missing 3 posts, anyway to recover them from old host?
- Is there a function to get post info for any publish_status by post ID?
- All images on one line for each post
- Your ideas on my though “delete or move all of the posts in a specific category when 3 days are passed”
- How Can I Always Display A Particular Post First Using WP_Query?
- Help on conditional statement to accompany wp_insert_post function please?
- MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?
- How can I globally italicize list of texts in the UI database or Posts? [closed]
- How do I assign an attachment to a post using only the REST API?
- Menu Items disappearing/being empty on save or post edit
- Prevent a post with a specific ID from being created
- Bulk find & replace on WordPress posts/pages (minus image paths)
- Unable to delete attached file from folder programmatically
- How to convert attachment pages to Posts?
- Get post attachment with post id
- Delete attached images from posts
- How can I stop ‘in use’ message from intermittently blocking my wp_posts table?
- More Than 50K Categories and WordPress Admin Panel Stop Showing Categories and Posts
- how i show manual data in a post
- Add in the url attachment loop the wp_link_pages of the post
- Maximum number of posts per page before affecting performance?
- SQL trigger failes with post_content
- Surrogate ID for posts, is there an alternative field in the posts table?
- get backup file from wordpress database in x days
- update post category in a new table on frequent change of category
- Expired Post with More Recent Time Stamp?
- How to get images only attached from edit post page
- Converting Posts to Pages
- How to change the publishing date of each posts?
- How to prevent people from seeing an attachment to a scheduled post that’s released in future?
- Extra field in wp_post instead of postmeta
- Given two custom post types: Automatically add meta fields from one custom post type to another
- How can I get a comment ID on Submit?
- Post Attachment missing head (stylesheets/js/what-not)
- Load posts from external source if not found in database
- Get Video Attachment to post
- What effect can a large wp_post table have on overall site performance?
- Broken images after importing posts and opening in Gutenberg
- How can I merge a several related posts into one post?
- WordPress Post Updating is Not Working