- This topic has 11 replies, 3 voices, and was last updated 8 years ago by
Tom.
-
AuthorPosts
-
March 20, 2018 at 9:31 am #524666
Dave
The featured image is working fine on with front page list, but not on the single post item. The “Disable Elements” feature is not activated. The box is checked to “Display featured images” in the customizer under layout/blog/featured image on the post tab.
Thanks for any help
March 20, 2018 at 11:03 am #524758Leo
StaffCustomer SupportHi there,
Looks like you’ve figured out? I can see the featured image no problem:
http://www.screencast.com/t/9HuIcsFiOMarch 20, 2018 at 11:30 am #524785Dave
Hi Leo,
The issue is not corrected yet. The screen grab you show doesn’t have the featured image. If you go to the home page, the featured images are displaying in the list of post correctly. But when you click the link to the single post the featured images are not displaying on the single page. This is the issue.
Thanks,
DaveMarch 20, 2018 at 12:52 pm #524838Leo
StaffCustomer SupportAre you wanting to use featured image and page header at the same time?
March 25, 2018 at 6:39 pm #530527Dave
Yes, I want to page header, the post title, the featured image, and then the post text. I have the “display feature images” checked in the customizer, blog, layout for post area. If you go to the home page the header featured images displays fine, but if you click the post to load a single post the featured image is not displayed but I would like it there also.
Thanks,
DaveMarch 25, 2018 at 8:52 pm #530587Tom
Lead DeveloperLead DeveloperRight now the Page Header replaces the featured image on single posts and pages. We’re working on separating the two so they can be displayed at the same time.
For now, you can do something like this: https://generatepress.com/forums/topic/featured-image-does-not-appears-in-indivual-post/page/2/#post-525114
Let me know if this helps or not 🙂
March 26, 2018 at 7:58 am #531147Dave
Hi Tom,
Thanks for your speedy response on a Sunday evening. I’m impressed. I tried using the code (below) in the “additional CSS area of the customizer, but it was showing 6 errors and I wasn’t able to save it. Then I tried using a child theme and added the code to the style.css file. It did nothing.
If you working on the better solution in the works, I guess I can wait. But if you have another suggestion using css please let me know.
Thanks,
Daveadd_action( ‘generate_after_content’, ‘tu_add_featured_image’ );
function tu_add_featured_image() {
if ( has_post_thumbnail() && is_singular() ) {
the_post_thumbnail();
}
}March 26, 2018 at 9:16 am #531266Leo
StaffCustomer SupportThat’s PHP code so try one of these methods: https://docs.generatepress.com/article/adding-php/
Code snippets is the easiest if you aren’t using a child theme.
March 26, 2018 at 9:32 am #531292Dave
Hi Leo,
Yes, the code is working. Thank you. I would like one adjustment if possible. Could the featured image be inserted after the title and before the text of the post ( on the single post page only)? So the elements on the single post page would be the header, the post title, the date, the featured image, and then the post text.
If there is an easy fix I would be very happy. I’m happy now just to have the featured image on the post page.
Thanks again,
DaveMarch 26, 2018 at 10:28 am #531391Tom
Lead DeveloperLead DeveloperAbsolutely! Instead of:
add_action( 'generate_after_content', 'tu_add_featured_image' );Do this:
add_action( 'generate_after_entry_header', 'tu_add_featured_image' );March 26, 2018 at 10:38 am #531407Dave
Hi Tom,
Thank you, Thank you. Your code change is exactly what I wanted. Great theme and great support! I’m glad I purchased the upgrade to Premium.
Dave
March 26, 2018 at 10:43 pm #531968Tom
Lead DeveloperLead DeveloperThanks! Glad I could help 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.