[Resolved] Trouble with charge theme

Home Forums Support [Resolved] Trouble with charge theme

Home Forums Support Trouble with charge theme

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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.

    #1226094
    David
    Staff
    Customer Support

    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

    #1226365
    Arief

    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?

    #1226582
    Leo
    Staff
    Customer Support

    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/

    #1230556
    Arief

    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?

    #1230619
    Leo
    Staff
    Customer Support

    Did the link to your site change?

    This is what I’m seeing currently:
    https://www.screencast.com/t/W3oQrjeXh

    #1230660
    Arief

    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?

    #1230699
    Leo
    Staff
    Customer Support

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

    #1230735
    Arief

    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

    #1231500
    Leo
    Staff
    Customer Support

    No problem 🙂

    #1538229
    Arief

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

    #1538268
    Leo
    Staff
    Customer Support

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

    Thanks 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.