I enabled featured image to be automatically shown in posts and I don’t need to also insert it manually inside the post. It turns out that in previous posts, they were showing two highlighted images. I created a plugin hoping that it would solve the problem, but it didn’t work. What should I do?
Hi,
If I understand correctly, the image in old posts is displaying twice, what can be done in this situation is to use a code, css and javascript and if the first element from the post is an image to be removed/hide, if you want, I can try to see if I can make a code for this.
Thank you!
I have seen something like the same: In my old blogposts, from before Newspaper, I started the post with the same image as the featured image. Now, having moved to Newspaper, some of these old articles have the photo twice.
The easy solution will be to edit these articles and remove the image.
My suggestion would be to do this year by year (or month by month) by going to https://your.website/2022/ etc
“I imagine that you, as the creators of the theme, know the IDs of each element exactly. I’ll try to explain the situation better, where two images appear. I create the website and insert both images for the post and for the featured images. After that, I decide to use only featured images. Automatically, the image will show up in the post and on the cover. However, the images that were added before, when I inserted them for both post and featured image before configuring the featured image to do it all at once, keep appearing twice. I’m not sure exactly what to do.”
Hi danielpaixaobr, I understand the situation, unfortunately there is no option to remove the first image at the beginning of the content, the only option in the theme is to remove the featured image element inside the posts, but I think that this is not a solution for the latest posts, right?
I believe that it can be a function similar to this one – https://pastebin.com/fujUnciC (this code it will apply for the first image inside the post, but you need it only if this is the first element in the post). Another alternative is to use a JavaScript.
Thank you!