protected function getExcerpt($content)
    {
        // Check for excerpt tags
        $pattern = '#(\<\!\-\-\s?excerpt\s?\-\-\>)(.*)(\<\!\-\-\s?endexcerpt\s?\-\-\>)#si';
        if (preg_match($pattern, $content, $matches)) {
            return $matches[2];
        }

        // If all else get the content from the first paragraph
        return $this->description;
    }
protected function getExcerpt($content)
    {
        // Check for excerpt tags
        $pattern = '#(\<\!\-\-\s?excerpt\s?\-\-\>)(.*)(\<\!\-\-\s?endexcerpt\s?\-\-\>)#si';
        if (preg_match($pattern, $content, $matches)) {
            return $matches[2];
        }

        // If all else get the content from the first paragraph
        return $this->description;
    }
protected function getExcerpt ( $ content ) { // Check for excerpt tags $ pattern = '#(\<\!\-\-\s?excerpt\s?\-\-\>)(.*)(\<\!\-\-\s?endexcerpt\s?\-\-\>)#si' ; if ( preg_match ( $ pattern , $ content , $ matches ) ) { return $ matches [ 2 ] ; } // If all else get the content from the first paragraph return $ this -> description ; }
Get excerpt from between excerpt tags or
first paragraph.

@param  string $content
@return string
Get excerpt from between excerpt tags or first paragraph .