Wednesday, January 28, 2015

excerpt or read more text cut program

$content=get_the_content();
$words = explode(" ", $content);
$first = join(" ", array_slice($words, 0, 50));
echo $first;

No comments:

Post a Comment

Workflow of WordPress project in a team with Git

1. We should not push any Wordpress core folders or files to github. 2. Only push custom theme and custom plugin into github. 3. So, in this...