Archived topic
clarification on double featured images
29 replies · Started by cath on February 5, 2016
Hi Tom,
Thank you!
It has been a little while but I did do #1. this is what the issue was, as I wrote further up before I think it got confusing so I edited this for better hopeful clarity:
I thought I had resolved the featured image issue – I added the code to functions.php at the other site I am working on to test and have the first post full length PLUS I had already added this code to CSS as follows [.page-header-image-single {
display: none;
} ] ,
however, the first image on my blog showed up full with TWO featured images.
When I went to remove the set featured image on that first post, I removed it, saved, and it still appeared. I tried this twice and for some reason it would remove it so I continued to have two featured images.
I removed the functions.php code for now.
I would like the first post to be full length with just one image. I like to set featured images in general but in theory could avoid doing so. I do not want double featured images showing on the old posts that already have this set.
****
#3) I believe my WP is 3.9.3. It was suggested by a host company that I switch to the 2016 WP default to update and then switch the theme back. I will update, I just am wary.
As far as #4, I had tried that and it was not quite working but since it has been a few weeks, I will try again.
Thank you.
Cath
Ah, I understand now, sorry about that.
Try this:
.blog .type-post:first-child .entry-content img,
.archive .type-post:first-child .entry-content img {
display: none;
}
Let me know if that gets us closer :)
Hi Tom,
No worries. Thanks for the help.
Just to clarify - where am I placing this code?
Thank you --
Cath
This should help: https://generatepress.com/knowledgebase/adding-css/
Hi, yes, I know; I just wanted to make sure it was CSS and did not go elsewhere. Thanks!
So right now I have this code in CSS - should I leave that or not?
.page-header-image-single {
display: none;
}
This is on the test site. Thanks!
You can keep that if you're still getting double images on the single post page :)
Hi Tom, Hope things are good.
When I added this code (along with the added functions.php code to have full length post and the other CSS to remove double featured images)
.blog .type-post:first-child .entry-content img,
.archive .type-post:first-child .entry-content img {
display: none;
}
it messed up other photos in the post. So I removed this code.
I tried removing the other CSS code to be sure which thing was causing it but it was definitely this code. The post has like eight photos and the bottom photos did not appear (just the text showed, sort of jumbled).
(It is at http://washingtonsquareparkblog.com but I removed the other code. I can put it back to show you perhaps later.)
Thanks for any advice. I did not try doing the columns again yet!
Cath
p.s. I could also take a screen shot of it later.
Ah, it helps seeing the site.
Can you try this code?:
.blog .type-post:first-child .post-image,
.archive .type-post:first-child .post-image {
display: none;
}
Hi Tom,
That worked ! Thanks so much!!!
I am going to try out the columns later.
I wondered about the social icons on the posts, particularly the first posts. I know the social plugins are not related to your theme, but I have used themes where the (FB, Twitter) icons show on the first post when it is full-length. Is that something you can help with, particularly the first one ?
Thanks again!
Cath
That would definitely completely on the social plugin you're using I think - they all have different settings and different methods for inserting themselves into full posts/excerpts.
Hi Tom, yes, it was the plugin. got it sorted out.
I think I figured out the columns although I may have other questions about that to come.
Right now, I have my first post set full length having changed code in functions.php.
Is there a way to make the first two posts full length?
Thanks again!
Cath
Give this PHP a try (instead of the other code you're using): https://gist.github.com/generatepress/247fc8309d9e8a683f04
so I should remove the other ? Thanks! Will give it a try.
Yes, replace the old one with this one :)
