Change the headline for the Jetpack related posts
Created
October 18, 2021 23:01
-
-
Save WhiteHatJoker/d9e36f8ff53d171cf87d92eccc12ed58 to your computer and use it in GitHub Desktop.
Change the headline for the Jetpack related posts
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
//Change the related posts headline | |
function jetpackme_related_posts_headline( $headline ) { | |
$headline = sprintf( | |
'<h3 class="jp-relatedposts-headline"><em>%s</em></h3>', | |
esc_html( 'Similar articles you may find helpful...' ) | |
); | |
return $headline; | |
} | |
add_filter( 'jetpack_relatedposts_filter_headline', 'jetpackme_related_posts_headline' ); | |
//Do not display the related post context | |
add_filter( 'jetpack_relatedposts_filter_post_context', '__return_empty_string' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment