Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Replace or translate text strings that's not translatable with gettext.
// Check page content and replace text strings
function change_text_str_replace( $text ) {
global $pmpro_pages;
if ( is_page( $pmpro_pages['account'] ) ) {
$text = str_replace( 'Change', 'Add', $text );
return $text;
add_filter( 'the_content', 'change_text_str_replace', 25 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment