Created
December 20, 2017 11:39
-
-
Save sandeshjangam/17e3280558d3748c1c1c7f42562bc13a to your computer and use it in GitHub Desktop.
How to remove excerpt on blog page?
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
add_filter( 'the_excerpt', 'ast_custom_blog_remove_excerpt' ); | |
function ast_custom_blog_remove_excerpt( $content ) { | |
/* If it is blog page then set $content empty. */ | |
if ( is_home() ) { | |
$content = ''; | |
} | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment