• Hi.
    I wan’t to change the ” — Please select — ” button on my website, but I can’t find it. I’ve found it in the danish translation, but it won’t change. Anyone who can help?
    I’m pretty new to Loco translate.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can use the function below. You can see ‘Name’ has been changed to ‘First Name’. Similarly you can change any text on your theme to any other text. Thanks!

    add_filter( 'gettext', 'theme_change_comment_field_names', 20, 3 );
    function theme_change_comment_field_names( $translated_text, $text, $domain ) {
    
        if ( is_singular() ) {
    
            switch ( $translated_text ) {
    
                case 'Name' :
    
                    $translated_text = __( 'First Name', 'theme_text_domain' );
                    break;
            }
    
        }
    
        return $translated_text;
    }

    Hello, I tried this but I return HTTP-500 fault on my page.
    I wanted to change the button Know more.
    I copied your function and changed ‘Name’ and ‘First Name’
    I’ve put in a function.php (I copied the origanal one and placed it in my childtheme)
    What did do wrong?
    Mmmarianne, did you have the same problem?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Change a button’ is closed to new replies.