Change the Related Posts Title
This is a Developer Level doc.
If you're unfamiliar with PHP and/or editing files, codes and templates, as well as with resolving possible conflict, please seek help from a professional. Under our Support Policy, we don't provide support for modifications and customization.
Default OceanWP related posts title is - You Might Also Like.
If you would like to change this text with a text of your own, use the following PHP snippet:
NOTICE: This filter is available in OceanWP 1.8.6 version and above.
/**
* Change the Related Posts title "You Might Also Like" by "Related Posts"
*/
function myprefix_related_posts_title() {
$my_txt = esc_html__( 'Related Posts', 'oceanwp');
return $my_txt;
}
add_filter( 'ocean_single_related_posts', 'myprefix_related_posts_title' );
Replace Related Posts with a text or translation of your own.
All PHP snippets should be added via a child theme's functions.php file.
