Filter the Related Posts headline.
Parameters
- $headline
string Related Posts heading.
Changelog
- Introduced in Jetpack 3.0.0
How to use this hook
Notes
In the example below, we’ll use the filter to change the headline heading from H3 to H4, and change the “Related” text into “Check These Out!”:
function jetpackme_related_posts_headline( $headline ) {
$headline = sprintf(
'<h4 class="jp-relatedposts-headline"><em>%s</em></h4>',
esc_html( 'Check These Out!' )
);
return $headline;
}
add_filter( 'jetpack_relatedposts_filter_headline', 'jetpackme_related_posts_headline' );