Skip to content

Instantly share code, notes, and snippets.

Kevin Donnigan anythinggraphic

Block or report user

Report or block anythinggraphic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@anythinggraphic
anythinggraphic / functions.php
Created Nov 16, 2016 — forked from Deaner666/functions.php
Add customized 'read more' links to hand crafted excerpts
View functions.php
<?php
/* Add "Read More" link to hand-crafted excerpts
----------------------------------------------------------------------------------------*/
add_filter('get_the_excerpt', 'ag_manual_excerpt_read_more_link');
function ag_manual_excerpt_read_more_link($excerpt) {
$excerpt_more = '';
if (has_excerpt() && ! is_attachment() && get_post_type() == 'post') {
$excerpt_more = '&nbsp;<a href="' . get_permalink() . '">[Continue&nbsp;reading] <span class="screen-reader-text">' . get_the_title() . '</span></a>';
}
You can’t perform that action at this time.