- This topic has 7 replies, 2 voices, and was last updated 9 years, 4 months ago by Tom.
-
AuthorPosts
-
July 19, 2015 at 4:44 am #122115Luis
Hi Tom,
First of all I want to congratulate you on making such a great theme with such awesome support.
I’m currently working redesigning a site but I’m having trouble getting the homepage looking right. My first approach was to show the featured image with an excerpt from the post showing but the problem is that the featured image is also included in the first paragraph of the content. This means that the image would appear twice on the homepage for each blog post. Is there any way to strip the HTML from the excerpts shown in this area? I’m currently hiding the featured image so that it doesn’t duplicate.
The second question is: even though I’ve selected to hide the featured image it is still showing up above the header in the actual blog posts. I thought this might be a caching issue but I’ve emptied the cache, cleared my browser’s content and did a full reload of the page. I can’t get rid of the featured image on the blog post itself.
Thank you for your help!
July 19, 2015 at 10:17 am #122167TomLead DeveloperLead DeveloperHi Luis,
To strip formatting from the Excerpt, set the blog post content option to show the excerpt instead of the full post in “Customize > Blog > Blog Content”.
To remove the featured image on the single blog post, you can add this CSS:
.single .page-header-image-single { display: none; }
Let me know if you need more info π
July 20, 2015 at 11:01 pm #122544LuisHi Tom,
Thanks so much for your quick response. I was able to find the solution to the HTML in the excerpt in another one of your support threads: http://generatepress.com/forums/topic/blog-excerpt-length-not-working/#post-122509. I just had to disable the MORE tag and it worked like a charm.
I also used your CSS solution to hide the featured image in the single blog posts. While it does the trick, I was hoping to completely prevent the image from loading at all to reduce download times. Is there no option to disable it from the theme customizer? If not, what would I need to do to implement this in my child theme?
I really appreciate your help. I bought the theme extensions pack and it really opens up so many possibilities with the great theme you’ve created.
Cheers!
July 20, 2015 at 11:51 pm #122565TomLead DeveloperLead DeveloperYou can definitely prevent the featured image from being on the single page using some PHP – do you have the Page Header add-on enabled?
July 21, 2015 at 8:55 pm #122800LuisYes, I do.
July 21, 2015 at 11:47 pm #122822TomLead DeveloperLead DeveloperTry adding this function:
add_action( 'init','generate_remove_single_page_header' ); function generate_remove_single_page_header() { remove_action('generate_before_content','generate_page_header_single', 10); }
Let me know if that does it or not π
July 22, 2015 at 6:04 am #122860LuisThank you, that worked like a charm.
You’re the best, Tom!
July 22, 2015 at 8:59 am #122875TomLead DeveloperLead DeveloperAwesome, happy to help! π
-
AuthorPosts
- You must be logged in to reply to this topic.