• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Search results: Excerpt when Content is empty

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Search results: Excerpt when Content is empty

This topic is: not resolved

Tagged: content, Excerpt, search

  • This topic has 2 replies, 2 voices, and was last updated 10 years, 9 months ago by Sridhar Katakam.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • October 11, 2014 at 7:40 pm #127517
    patgilmour
    Member

    My Genesis search results page shows the post Content by default.

    However, I have a custom post type 'webcast' where I want it to show the Excerpt instead.

    I admit I can't get off first base on this one, so I have no worthy code attempt to post.

    Any suggestions?

    October 11, 2014 at 8:59 pm #127526
    patgilmour
    Member

    I did try modifying the code found on Sridhar Katakam's page:

    Display full content in category pages for selected categories in Genesis

    Like so:

    add_action( 'genesis_before_loop', 'adam_search_result_filter' );
    function adam_search_result_filter() {
    
    	global $post;
    
    	if ( ( is_search() ) && ( get_post_type( $post ) == 'webcast' ) ) {
    
    		remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
    
    		add_action( 'genesis_entry_content', 'adam_do_search_content' );
    
    	}
    
    }
    
    function adam_do_search_content() {
    
    	echo get_the_excerpt() . 'bingo';
    
    }

    But this removed the genesis_entry_content for every result listed.

    So, I guess genesis_before_loop isn't the right filter. Any suggestions what to use?

    October 12, 2014 at 5:11 pm #127597
    Sridhar Katakam
    Participant

    Are you trying to force Excerpts to appear on a specific CPT archive page?


    Genesis Tutorials | Follow me on Twitter

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble