[Resolved] Paragraph below the post title

Home Forums Support [Resolved] Paragraph below the post title

Home Forums Support Paragraph below the post title

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #1479554
    Leo
    Staff
    Customer Support

    We can probably just hide it with CSS.

    Can you link me to the page in question?

    #1479560
    Liran

    What do you mean by just hide it?

    If I recall correctly, you said that we can make the excerpts different.

    #1479565
    Leo
    Staff
    Customer Support

    I’m a little lost as this topic was from a while ago.

    Can you link me to the page in question so I can see what has been done and what the issue is?

    #1479579
    Liran

    I’m currently using the custom excerpt to show a paragraph underneath the titles.

    I followed the instructions here: https://docs.generatepress.com/article/page-hero-examples/#example-4

    Then created a hook element and added the shortcode.

    And it works!

    However, I want the blog/archives to show the default excerpt instead of the custom excerpt.

    Does that make sense? If not, I can leave you a link.

    #1479849
    David
    Staff
    Customer Support

    You can try adding this PHP snippet to your site:

    add_filter( 'get_the_excerpt', function( $text ) {
        if ( !is_single() ) 
            return wp_trim_excerpt();
    
        return $text;
    });

    This will return the auto excerpt unless on the Single Post.

    Then the method i provided earlier should work for you.

    #1481150
    Liran

    Thanks, everyone. You’re the best!

    #1481588
    David
    Staff
    Customer Support

    Glad we could be of help

Viewing 7 posts - 16 through 22 (of 22 total)
  • You must be logged in to reply to this topic.