WordPress Recent Post + Excerpt Customization

Something that should be oh so simple! A client requested a title and excerpt of her newest WordPress post on the front page of her custom WordPress website/blog.  Mind you, if you would like to insert the newest posts in your sidebar,  it is a simple drag and drop of a widget to activate….

But in this case, we needed something a little more custom! In the index.php file located in your custom template add the following code snippet:

<a href=”<?php the_permalink() ?>” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></a>
<?php echo substr(get_the_excerpt(), 0,224); ?> …..

You can control the length of the excerpt by modifying the “224” to the required amount of characters for your space.

Save your index.php file and you’re done and ready to start blogging!