• 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

Wrap Excerpt In Custom Tag

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 › Wrap Excerpt In Custom Tag

This topic is: resolved

Tagged: Excerpt, post excerpt

  • This topic has 2 replies, 1 voice, and was last updated 7 years, 1 month ago by ashleymichelle.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 23, 2018 at 2:08 pm #219203
    ashleymichelle
    Member

    I am attempting to wrap the genesis outputted post excerpt in a custom <p> class, but I have been unable to do so thus far, without crashing my theme.

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

    Thank you!

    http://ohmybonbon.com
    April 23, 2018 at 2:45 pm #219205
    ashleymichelle
    Member

    Also, I would like to remove all excerpts while maintaining the "Read More" link, unless they are manual excerpts.

    May 1, 2018 at 1:28 am #219460
    ashleymichelle
    Member

    For anyone else interested in a solution to wrapping the_excerpt into a <p class=""> tag, here is what I used (I put it into a custom plugin).

    // * Excerpt Formatting *//
    
    add_filter( 'the_excerpt', 'bonbon_excerpt' );
    function bonbon_excerpt() {
    	return '<p class="excerpt">' . get_the_excerpt() . '</a>';
    }
  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Wrap Excerpt In Custom Tag’ is closed to new 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