Site logo

Archived topic

Trouble with charge theme

11 replies · Started by Arief on April 4, 2020

Viewing posts 1–12 of 12

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.

Hi 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_title hook.

Then this Topic here has a snippet to remove the excerpt from the Archive:

https://generatepress.com/forums/topic/showing-automatic-excerpt-on-the-wp-show-posts-list/page/2/#post-926233

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?

Try 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/

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?

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?

Yeah the combine CSS in LiteSpeed has been causing some issues so I'd recommend keeping that off.

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

No problem :)

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;
}

Any chance you can open a new topic for the new question?

Thanks :)

This archived topic is closed to new replies.