Today I am going to share with you how to customize post excerpts in Genesis. On your blog/home page you might want to customize the excerpt length and add a Read more link after the post excerpt. By default Genesis displays […] after the post excerpt and it does not link to the post. The good way to display […] after post excerpt is to show Read More or Continue Reading link that actually links to the post page.
To customize […] after post excerpt you can place the following code in functions.php:
function excerpt_read_more( $more ){
return '<a href="' . get_permalink() . '" rel="nofollow"> Read More</a>';
add_filter( 'excerpt_more', 'excerpt_read_more' );
}
You may also want to customize the size of post excerpt depending upon your need. To do so place the following code in functions.php:
function custom_excerpt_length($length) {
return 30;
}
add_filter('excerpt_length', 'custom_excerpt_length');