- This topic has 9 replies, 2 voices, and was last updated 4 years, 2 months ago by Leo.
-
AuthorPosts
-
February 7, 2020 at 12:22 pm #1158271Stephanie
I’ve searched the forums and read posts about how to disable the featured image on single custom post templates but the CSS I’ve seen does not seem to work.
Should this CSS:
.single .page-header-image-single {
display: none;
}be changed to:
.single .page-hero-background-image {
display: none;
} ?
Explanation: I used Elements to create a Page Hero section with a featured image that’s supposed to appear across the site.
What’s happening with my Events Template is the featured image that’s needed for the Events Manager plugin and the Event custom post is replacing the image that’s supposed to appear in the Page Hero section. I disabled the featured image option in the settings I found for Single page templates in the Customizer under Blog, I also disabled it for the Event page. I added CSS and I tried to write a function based on what I’ve seen in the forums but I seem to have messed up.
The staging site is here: http://34.69.246.245/events/the-elements-of-fiction-new-homeschool-workshop/
February 7, 2020 at 12:27 pm #1158274LeoStaffCustomer SupportHi there,
You are referring to this image right?
https://www.screencast.com/t/X1eLoioaApbTIf so that’s added with Elementor so none of GP’s options will work.
Let me know if I’m missing something here π
February 7, 2020 at 12:35 pm #1158281StephanieIt’s added as a featured image. It’s in the page hero section which is ruled by GeneratePress, as is the Header and Footer. Only the page container is Elementor.
In the page container Anywhere Elementor Pro pulls it in as a post image as does the Events Manager plugin in the sidebar. The image was not added with Elementor, it was added the usual way you add Featured images in WordPress. I think I need to write a function so that when the page is Events, I don’t pull in that image. Then the fallback image from GeneratePress will prevail.
February 7, 2020 at 12:45 pm #1158287LeoStaffCustomer SupportSorry I’m a bit confused.
Are you trying to remove the image in red or green?
https://www.screencast.com/t/uBCbZK4TjLet me know π
February 7, 2020 at 1:11 pm #1158308StephanieSorry, I didn’t mean to be confusing. The image that’s a problem is the green one. The page hero.
The page hero section was created using Elements in GeneratePress Premium. The background image appears when you add a featured image.
The page hero is supposed to have a banner with children. It appears on all the pages of the site except the front page.
Here’s the page on the original site: https://uptownstories.org/writing-workshop/the-elements-of-fiction-new-homeschool-workshop/
I’m not great in PHP but I think I need to write a function that says if the single event page has a featured image don’t use it in the page hero.
February 7, 2020 at 1:18 pm #1158315LeoStaffCustomer SupportSo what if you create a page hero using the custom image (instead of featured image) as the background image and assign that the single event page?
Or I’m still missing something here?
February 7, 2020 at 1:33 pm #1158325StephanieI have to use featured image for each Events post. That’s how it’s set up in the Events Manager plugin. That image is to appear with each event on the events (workshops)page.
I used GeneratePress to create a Page Hero section.
https://docs.generatepress.com/article/how-to-create-a-page-hero/
Because I used the featured image for the event, GeneratePress is putting that image in the Page Hero section. The only way to add an image to the Page Hero section seems to be via featured image.
I don’t want the event custom post type’s image (the post image, the featured image) in the Page Hero section. I want the banner with the children, the one that shows on the rest of the site.
I have disabled the featured image/Page Hero on the single Event page in the page settings and in the Customizer settings for Blog etc. The image still shows up. How do I keep that image, the one you circled in green, from appearing?
I think I need to write a function to fix this.
Thanks and best wishes
February 7, 2020 at 1:53 pm #1158335LeoStaffCustomer SupportThe only way to add an image to the Page Hero section seems to be via featured image.
There are actually two ways to add a background image to the page hero.
– Custom image: This option allows you to upload a custom image specific for this page hero. This means that every page with the page hero applied will have this custom image you’ve uploaded. I believe this is what you need (for example, the banner with children image)
– Featured image: This option uses the Featured Image added in the pages or posts as the background image. This means that the background image will be different every page according to your featured image.
Let me know if we are on the right track π
February 7, 2020 at 2:01 pm #1158339StephanieYes, that definitely solves it! Thank you.
I still don’t understand why the disable settings didn’t work but hey, at least there’s a way to fix this!
February 7, 2020 at 4:56 pm #1158406LeoStaffCustomer SupportNo problem π
-
AuthorPosts
- You must be logged in to reply to this topic.