Excerpt [...] won't disappear upon removal

Community Forums Forums Design Tips and Tricks Excerpt [...] won't disappear upon removal

This topic is: resolved

Tagged: 

This topic contains 1 reply, has 1 voice, and was last updated by  ATS 2 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #118108

    ATS
    Participant
    Post count: 16

    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?

    #118137

    ATS
    Participant
    Post count: 16

    Nevermind, found the solution by adding this filter:

    add_filter('excerpt_more','__return_false');

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Excerpt [...] won't disappear upon removal’ is closed to new replies.