• Resolved themesbyte

    (@themesbyte)


    Hi guys, i have a problem i receive 00000 or 001000 in front of excerpts and then the text. Why cause that? My custom excerpt function is bellow:

    function locality_excerpt($len=80, $trim="…")
    	  	{
    		  	$limit = $len+1;
    		  	$excerpt = explode(' ', get_the_excerpt(), $limit);
    		  	$num_words = count($excerpt);
    		  	if($num_words >= $len)
    			{
    		  		$last_item=array_pop($excerpt);
    		  	}
    		  	else
    		  	{
    		  		$trim="";
    		  	}
    		  	$excerpt = implode(" ",$excerpt)."$trim";
    
    		  	echo $excerpt;
    	  	}
    
    	  	function get_locality_excerpt($len=80, $trim="…")
    	  	{
    	  		$limit = $len+1;
    	  		$excerpt = explode(' ', get_the_excerpt(), $limit);
    	  		$num_words = count($excerpt);
    		  	if($num_words >= $len){
    		  		$last_item=array_pop($excerpt);
    		  	}
    		  	else
    		  	{
    		  		$trim="";
    		  	}
    	  		$excerpt = implode(" ",$excerpt)."$trim";
    
    	  		return $excerpt;
    	  	}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Excerpt problems shwing 00000 before excerpt’ is closed to new replies.