• 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

Excerpt […] won't disappear upon removal

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 › Excerpt […] won't disappear upon removal

This topic is: resolved

Tagged: Excerpt

  • This topic has 1 reply, 1 voice, and was last updated 11 years, 5 months ago by ATS.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • August 10, 2014 at 4:08 pm #118108
    ATS
    Participant

    Hi,

    I would appreciate and help possible!

    Did a mockup site here http://www.centenocustom.com
    then transferred everything over to http://www.realmenrealstyle.com

    Genesis settings are the same, functions.php is the same but [...] under featured images on the home page does non disappear.

    Here is what I mean here - you may compare:
    http://screencast.com/t/QZ92QSiKL
    http://screencast.com/t/0F76FHvR

    in functions.php I have the following:

    //* Modify the length of post excerpts
    add_filter( 'excerpt_length', 'sp_excerpt_length' );
    function sp_excerpt_length( $length ) {
    return 0; // pull first 0 words
    }
    
    //* Modifying the [...] that ends an excerpt. Change "array_push($words, '')" to "array_push($words, '[...]')" to return to original state
    
    function wp_new_excerpt($text)
    {
    	if ($text == '')
    	{
    		$text = get_the_content('');
    		$text = strip_shortcodes( $text );
    		$text = apply_filters('the_content', $text);
    		$text = str_replace(']]>', ']]>', $text);
    		$text = strip_tags($text);
    		$text = nl2br($text);
    		$excerpt_length = apply_filters('excerpt_length', 55);
    		$words = explode(' ', $text, $excerpt_length + 1);
    		if (count($words) > $excerpt_length) {
    			array_pop($words);
    			array_push($words, '');
    			$text = implode(' ', $words);
    		}
    	}
    	return $text;
    }
    remove_filter('get_the_excerpt', 'wp_trim_excerpt');
    add_filter('get_the_excerpt', 'wp_new_excerpt');

    Where could be a problem?

    August 10, 2014 at 11:35 pm #118137
    ATS
    Participant

    Nevermind, found the solution by adding this filter:

    add_filter('excerpt_more','__return_false');

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Excerpt […] won't disappear upon removal’ 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

© 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