Title: Blog snippets
Last modified: August 20, 2016

---

# Blog snippets

 *  [Peter G.](https://wordpress.org/support/users/peter-g-2/)
 * (@peter-g-2)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/blog-snippets/)
 * Hey all,
 * I’m working on a client website and I’ve got an idea I need some help with.
 * What I’d like to do is present the title and brief snippet of the most recent
   blog post on the homepage. The homepage will be part of the WordPress install,
   but it is so heavily customized that this snippet is really the only content 
   being pulled from the WordPress database.
 * [Here’s a screenshot](http://gurrydesign.com/portfolio/pictilio/Pictilio_homepage_07.jpg)
   to give you some context. The section titled “From our blog” is the section I’m
   referring to.
 * Any suggestions on the best way to go about doing this?
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Chris Olbekson](https://wordpress.org/support/users/c3mdigital/)
 * (@c3mdigital)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/blog-snippets/#post-3034418)
 * See the codex article on [WP_Query.](http://codex.wordpress.org/Class_Reference/WP_Query).
   I would suggest doing a simple [get_posts](http://codex.wordpress.org/Template_Tags/get_posts)
   call to retrieve the title and excerpt from the latest post.
 *     ```
       $posts = get_posts( array( 'posts_per_page' => 1) );
   
            foreach ( $posts as $post ) {
                echo apply_filters( 'the_title', $post->post_title; );
                echo apply_filters( 'the_excerpt', get_the_excerpt() );
            }
       ```
   
 *  Thread Starter [Peter G.](https://wordpress.org/support/users/peter-g-2/)
 * (@peter-g-2)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/blog-snippets/#post-3034612)
 * Will this need to be inside the loop?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Blog snippets’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Peter G.](https://wordpress.org/support/users/peter-g-2/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/blog-snippets/#post-3034612)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
