- This topic has 20 replies, 3 voices, and was last updated 7 years, 10 months ago by
Tom.
-
AuthorPosts
-
September 26, 2014 at 3:21 pm #34614
Michele Garcia
I am using the Exhibit child theme from Generate Press. I was wondering how to override or change the “featured images” function on WordPress. Right now, in order to have an image show with each post excerpt on the main home page, I have to set a featured image. Unfortunately, the selected “featured image” also shows up on each individual post, which means that there is a duplicate photo on each individual post. Is there a work-around for this?
September 27, 2014 at 10:01 am #34660Tom
Lead DeveloperLead DeveloperHi Michele,
Seems a lot of people want the option to remove this on the single post view, so I’m going to add it as an option.
As of right now, you can use the Disable Elements addon, or this CSS:
.page-header-image-single { display: none; }
September 29, 2014 at 9:54 am #34974Michele Garcia
Hi Tom,
I’m unsure where to add the CSS code. I’m assuming the disable elements feature is in the “Blog” section of the customize window? It doesn’t seem to have any effect when I select hide on the post image drop down box.
Michele
September 29, 2014 at 10:05 am #34981Tom
Lead DeveloperLead DeveloperYou can add CSS using a plugin like this: https://wordpress.org/plugins/simple-css/
The Disable Elements addon adds a metabox when you’re editing your page/post. More details here: http://www.generatepress.com/downloads/generate-disable-elements/
September 29, 2014 at 5:26 pm #35222Michele Garcia
Thanks Tom! I didn’t realize it was in the edit window of the post. Since that will require me to edit each post, I also downloaded Simple Custom CSS to see if that works. Does the code you gave me above go between the /* */ symbols in the Simple Custom CSS window? If so, it looks like this:
/* .page-header-image-single {
display: none;
} */Or should it I replace whatever is in the Simple Custom window with just the code you gave me:
.page-header-image-single {
display: none;
}Thank you for your help!
Michele
September 30, 2014 at 9:39 am #35433Tom
Lead DeveloperLead DeveloperHi Michele,
It should go below the stars – anything wrapped in stars will be ignored.
So it should look like this, with no stars:
.page-header-image-single { display: none; }
February 13, 2015 at 5:26 am #74694Richard Prisco
Hi Tom,
I am trying almost the same thing, but completely disable featured images and only display page header images if declared. If I use the code above it disables both (does not work for me).
Please advise.
Best regards,
RichardFebruary 13, 2015 at 11:20 am #74789Tom
Lead DeveloperLead DeveloperHi Richard,
Not entirely sure what you mean? Featured Images and Page Headers are basically the same thing – the code above will disable them on single post pages, but not regular pages.
Where are you trying to disable them?
February 13, 2015 at 12:03 pm #74797Richard Prisco
Hi Tom,
Ok, I am using easyrecipes which has an img in it’s template for the recipe. It’s apparent that the 30 content sliders I have tried can’t pull the imgs out of the recipe template; so I have to use featured imgs for any slider to display the img; otherwise, the imgs come up empty or default “no image available” img depending on the slider.
Now, I was using your page header for the logo’s of any copycat recipes.
On single post pages it seams both the featured images and page header images are on the same <div> if I use…
.page-header-image-single {
display: none;
}in styles.css then both don’t display. But I would like your page header img to display. Now the only thing that just crossed my mind is two separate <div>’s. Then you can hide either or… or both.
Best regards,
Richard
February 13, 2015 at 11:58 pm #74882Tom
Lead DeveloperLead DeveloperHi Richard,
This is where I get confused, you can only use the Featured Image or Page Header one at a time.
If a Page Header is set, it will overwrite the Featured Image and be shown on the page (the Featured Image won’t).
I’m probably missing something, but we’ll sort it out! ๐
February 14, 2015 at 6:32 am #75012Richard Prisco
Hi Tom,
Thanks for being so patient…
>>> This is where I get confused, you can only use the Featured Image or Page Header one at a time.
Yes, that’s the problem, on single page post, I only want your page header to display logos. Not all my recipes are copycat(very close) recipes in which they do not require logo’s. So on copycat recipes, I only use your page headers for logo display(say Betty Crocker logo).
I don’t want feature imgs to show at all on single page. I already have a recipe img in the recipe template. So if your page header logo doesn’t show anything because it’s not a copycat recipe, the feature kicks in with a duplicate redundant img of the recipe img. If it wasn’t for the sliders not being able to pull the imgs from the recipe template or sliders only pulling from featured imgs. I would not have to use feature imgs.
Now… If I turn display:none; feature imgs & your page header both turns off.
I would like to show only your page header imgs. if img(logo) is avail. and never feature imgs.
Hope that helps ๐
Best regards,
Richard
February 14, 2015 at 10:00 am #75054Tom
Lead DeveloperLead DeveloperHi Richard,
Do you have a link to a page that is showing both the page header and featured image?
Are you using the Page Header add-on to show your site logo?
Let me know ๐
February 14, 2015 at 11:43 am #75081Richard Prisco
>>>Do you have a link to a page that is showing both the page header and featured image?
They do not show both at the same time, page header img takes precedence then featured img. The problem is that if there is no pg header then feature img shows. I don’t want feature img to show at all on single pg, just from pg header. If I display:none both stop showing and I want page heading. Even if there is a feature img I don’t want it to display at all. Because they are both on the same div if I display:none nothing shows. But if there were two separate divs. Either one can be shut off or both depending on the admins needs.>>>Are you using the Page Header add-on to show your site logo?
YesFebruary 15, 2015 at 12:38 am #75124Tom
Lead DeveloperLead DeveloperGotcha, so we need to target those pages showing the Featured Images.
Option a) Use the Disable Elements add-on to disable the Post Image/Page Header on those specific pages.
Option b) Target the posts which have recipes (maybe they’re in a category? Custom post type?) and hide the featured image for them only.
Let me know ๐
February 15, 2015 at 10:50 am #75204Richard Prisco
>>> Gotcha, so we need to target those pages showing the Featured Images.
yes, the only time i use feature imgs is in the front page slider.>>> Option a) Use the Disable Elements add-on to disable the Post Image/Page Header on those specific pages.
Q: Wouldn’t that be like display:none; in CSS, turn both featured img and pg header img off? Besides I have a larger prob, I have about 1 – 2 million recipes, I love cooking, could you see yourself editing and clicking Disable Element on all those recipes. And the other side of the coin…I would be dead from clicking before I was able to cook anything. Or my clicker finger would just fall off!:)>>> Option b) Target the posts which have recipes (maybe theyโre in a category? Custom post type?) and hide the featured image for them only.
All posts are recipes, just recipes, nothing butt recipes.Is there any way you can add a seperate <div> class for page headers either above or below (or choice of) featured imgs. Then all I would have to do is display:none; on featured imgs. and still get your pg header imgs.
-
AuthorPosts
- You must be logged in to reply to this topic.