Append ‘Read More’ to the end of the_excerpt()

This snippet, when added to your theme’s functions.php file, will allow you to append ‘… Read More’ or any other text to the end of your excerpts. Creates a more streamlined look.

<br />
function excerpt_readmore($more) {<br />
	return '... &lt;a href=&quot;'. get_permalink($post-&gt;ID) . '&quot; class=&quot;readmore&quot;&gt;' . 'Read More' . '&lt;/a&gt;';<br />
}<br />
add_filter('excerpt_more', 'excerpt_readmore');<br />


Published by

Drew Jaynes

Drew is a former Core Developer for the WordPress open source project, and he works on cool plugins like AffiliateWP, Easy Digital Downloads, and Restrict Content Pro.

One thought on “Append ‘Read More’ to the end of the_excerpt()”

Leave a Reply

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