Created
June 23, 2016 00:58
-
-
Save farinspace/c194c1f76fa699b12afef6ac405d9233 to your computer and use it in GitHub Desktop.
Adding additional content to the post excerpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'get_the_excerpt', 'my_get_the_excerpt' ); | |
function my_get_the_excerpt( $excerpt ) { | |
if ( 'nooz_coverage' == get_post_type() ) { | |
$excerpt .= ' — View more coverage at <a href="http://example.com">http://example.com</a>.'; | |
} | |
return $excerpt; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment