• 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

Remove Default Excerpt, Use Only Custom Excerpt, Wrap Excerpt In CSS Class

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 › Design Tips and Tricks › Remove Default Excerpt, Use Only Custom Excerpt, Wrap Excerpt In CSS Class

This topic is: not resolved

Tagged: the_excerpt

  • This topic has 1 reply, 2 voices, and was last updated 8 years, 5 months ago by Brad Dalton.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • April 25, 2018 at 7:58 pm #219284
    ashleymichelle
    Member

    I am attempting to wrap the genesis outputted post excerpt in a custom class, but I have been unable to do so, and can't figure out how to accomplish this task.

    Is there a filter I can add to my Theme Functions to accomplish this?

    Also, I would like to:

    1) Remove all default excerpts, and only display the manual excerpts when applicable
    2) Maintain the "Read More" link on all posts

    Thank you!

    http://ohmybonbon.com
    April 26, 2018 at 3:13 pm #219308
    Brad Dalton
    Participant

    I got this out of genesis > lib > structure > post.php

    add_action( 'genesis_entry_content', 'genesis_do_post_content' );
    add_action( 'genesis_post_content', 'genesis_do_post_content' );
    
    function genesis_do_post_content() {
    
    	if ( is_singular() ) {
    		the_content();
    
    		if ( is_single() && 'open' === get_option( 'default_ping_status' ) && post_type_supports( get_post_type(), 'trackbacks' ) ) {
    			echo '<!--';
    			trackback_rdf();
    			echo '-->' . "\n";
    		}
    
    		if ( is_page() && apply_filters( 'genesis_edit_post_link', true ) ) {
    			edit_post_link( __( '(Edit)', 'genesis' ), '', '' );
    		}
    	}
    	elseif ( 'excerpts' === genesis_get_option( 'content_archive' ) ) {
    		the_excerpt();
    	}
    	else {
    		if ( genesis_get_option( 'content_archive_limit' ) ) {
    			the_content_limit( (int) genesis_get_option( 'content_archive_limit' ), genesis_a11y_more_link( __( '[Read more...]', 'genesis' ) ) );
    		} else {
    			the_content( genesis_a11y_more_link( __( '[Read more...]', 'genesis' ) ) );
    		}
    	}
    
    }
    

    You can also filter the_excerpt and filter get_the_excerpt


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2026 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