Pulling latest posts from wordpress into any page

In order to pull a set number of words use:

Calling “wp-blog-header.php” is needed in order to have the wordpress functions available.
If you prefer to pull a fixed number of characters then “substr()” is needed – to avoid cutting a word in the middle you could search for the last space character from the end of the string.

Leave a Reply

Your email address will not be published. Required fields are marked *