I can't figure this out for the life of me... Using wordpress trying to display excerpt from posts starting 30 words in.. php mysql
Please help!
I can't figure this out for the life of me... Using wordpress trying to display excerpt from posts starting 30 words in.. php mysql
Please help!
This isn't the best solution, but it is a start. Get your post into a variable ($str
in this case ), and then just remove the first 30 words:
$str = preg_replace( "/(([^ ]* ){30})/", '', $str );
$str = implode(' ', array_slice(explode(' ', $original), 30));
Convert to array using a space as a seperator. Select starting at array index 30. Convert back to string.