- This topic has 11 replies, 2 voices, and was last updated 4 years, 11 months ago by
Leo.
-
AuthorPosts
-
April 4, 2020 at 3:59 am #1226046
Arief
I want to make CUSTOM(which you put manual way) excerpt gone from the front page but showed under feature image in single post. Is it possible? I’ve tried some coding from this forum but none of them worked.
April 4, 2020 at 4:58 am #1226094David
StaffCustomer SupportHi there,
you can use this PHP to display the Excerpt:
<?php if ( has_excerpt() ) : // Only show custom excerpts not autoexcerpts ?> <p class="post-excerpt"><?php echo get_the_excerpt(); ?></p> <?php endif; ?>Which you can add to a Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
The visual guide shows you where the hooks are:
https://docs.generatepress.com/article/hooks-visual-guide/#single-post
So if your featured image was above the title, you could add it to the
before_entry_titlehook.Then this Topic here has a snippet to remove the excerpt from the Archive:
April 4, 2020 at 8:01 am #1226365Arief
It worked.
Can you help me set the text to be justify and align nicely with the feature image above it and perhaps reduce the gap between the image and excerpt? Link already added on the first post
What should i add to change the excerpt’s color, font size and add bold in all post but not in wp-show post?
April 4, 2020 at 11:07 am #1226582Leo
StaffCustomer SupportTry this CSS for post excerpt:
.single p.post-excerpt { max-width: 800px; margin: auto; text-align: justify; color: #001819; font-size: 20px; font-weight: 700; }As for space between the excerpt and featured image, this setting should help:
https://docs.generatepress.com/article/content-separator/April 7, 2020 at 5:03 pm #1230556Arief
hi, can you check again my front page? after implement all css and snippet, looks like the box is not centered in mobile view. other view was okay. reducing the padding in customize worked but make every single post became mess. Could it be caused by cache plugin?
April 7, 2020 at 7:05 pm #1230619Leo
StaffCustomer SupportDid the link to your site change?
This is what I’m seeing currently:
https://www.screencast.com/t/W3oQrjeXhApril 7, 2020 at 8:21 pm #1230660Arief
sorry i forgot to change it. btw, i’ve managed to fix it by disabled combine css in litespeed plugin and turned combine css on in generatepress setting. what do you think, is that okay? should i turn on the dynamic css too?
April 7, 2020 at 9:29 pm #1230699Leo
StaffCustomer SupportYeah the combine CSS in LiteSpeed has been causing some issues so I’d recommend keeping that off.
April 7, 2020 at 10:38 pm #1230735Arief
Ok i moved to autoptimize although i’m on litespeed server. I think it performs same as litespeed. combine css worked without issue. Thx u
April 8, 2020 at 9:03 am #1231500Leo
StaffCustomer SupportNo problem 🙂
November 19, 2020 at 3:37 pm #1538229Arief
sorry is there anyway i can make excerpt in single post which appeared below featured image allign with the post content itself in desktop view? Or remove the white in left and right of my blog content and make the content wider.
I’ve used this additional css
.single p.post-excerpt {
max-width: 800px;
margin: auto;
text-align: justify;
color: #001819;
font-size: 20px;
font-weight: 700;
}November 19, 2020 at 5:00 pm #1538268Leo
StaffCustomer SupportAny chance you can open a new topic for the new question?
Thanks 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.