I am using wordpress 4.2 and I faced an issue in which an old featured image was displayed . I had removed the featured image and also made sure that there was no image in the post content also. Still an old image which was associated to the post was displayed in the listing page.
The theme that I was using a fallback so the image associated to the post was being displayed. I did not want to modify the theme files. I logged in to the database and then found the image that was appearing in the post. The data for that image was available in 'wp_posts' table. In the table there is a column called 'post_parent'. The value for this column for the particular image was the id for the post which was displaying the old image. I updated that to zero and my issue was solved.
The post parent for this image was set to this particular post because while setting the post featured image, the image was uploaded through that interface.
So hope this would help someone where they face this issue of a non associated image is coming for a post.
The theme that I was using a fallback so the image associated to the post was being displayed. I did not want to modify the theme files. I logged in to the database and then found the image that was appearing in the post. The data for that image was available in 'wp_posts' table. In the table there is a column called 'post_parent'. The value for this column for the particular image was the id for the post which was displaying the old image. I updated that to zero and my issue was solved.
The post parent for this image was set to this particular post because while setting the post featured image, the image was uploaded through that interface.
So hope this would help someone where they face this issue of a non associated image is coming for a post.
No comments:
Post a Comment