[Resolved] How to see full post content on search results?

Home Forums Support [Resolved] How to see full post content on search results?

Home Forums Support How to see full post content on search results?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2233333
    Deniz Akay

    Hello,

    I think Generatepress shows excerpts on WP post search results right? I already switched on “Full Content” option on Blog customization settings but it only allows me to show full post content on archive and single pages.

    Here is a sample search query with excerpts: https://www.altcoinnet.com/haber/bitcoin+btc

    Every post has a link at the end which points to original content on a different website and it’s generated with a shortcode. Somehow search results trim the text and do not show these links.

    Is there a way to show full post content on search results?

    Thx

    #2233799
    Ying
    Staff
    Customer Support

    Hi Deniz,

    You can use a block element – content template to build a custom layout for the search results page.

    The Dynamic Content block (with GP logo as its icon) allows you to choose show excerpt or full content.

    #2233827
    Deniz Akay

    Hi Ying,

    Content templates really look great but I just want to keep it simple as possible an bypass this “trim” problem somehow.

    Look, here in my category page everything looks fine with posts, you can see all outgoing links at the end of posts: https://www.altcoinnet.com/btc-bitcoin/

    I just want to apply same to search results page. There should be a function to do that…

    #2233937
    Ying
    Staff
    Customer Support

    I see, try this PHP snippet:

    add_filter( 'generate_show_excerpt', function($show_excerpt ) {
    	if(is_search()) {
    		$show_excerpt = false;
    	}
    	return $show_excerpt;
    });
    #2234661
    Deniz Akay

    This was what I’m talking about! Thanks Ying

    #2235500
    Ying
    Staff
    Customer Support

    No problem 🙂

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