Title: Change button text
Last modified: August 31, 2016

---

# Change button text

 *  Resolved [hendrys](https://wordpress.org/support/users/hendrys/)
 * (@hendrys)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/change-button-text-14/)
 * There are 2 main buttons on the main page of this theme:
 * Contact me
    Download resume
 * Can somebody tell me where to change te text of these buttons? I would like to
   translate them to Dutch language

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

 *  [Madhusudan Pokharel](https://wordpress.org/support/users/madhusudan977/)
 * (@madhusudan977)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/change-button-text-14/#post-7062110)
 * Hello Hendrys,
    You can change those two texts by using a WordPress function 
   which translates texts ([https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext](https://codex.wordpress.org/Plugin_API/Filter_Reference/gettext)).
   For example: To change ‘Resume’ to ‘Resumé’, just add the below codes inside ‘
   functions.php’ of child theme.
 *     ```
       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 'Contact Me' :
   
                       $translated_text = __( 'Neem contact met mij', 'Bizlight' );
                       break;
   
                       case 'Download Resume' :
   
                       $translated_text = __( 'Download Resumé', 'Bizlight' );
                       break;
               }
   
           }
   
           return $translated_text;
       }
       ```
   
 * Note: This function translates all the matching text to the translating text 
   allover the theme.
    Also,It is recommended to create child theme if you are going
   for the coding option else your changes won’t be saved when you update the theme.
   For that: [https://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme](https://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
 * Let me know how it goes!!
 *  [camasurich](https://wordpress.org/support/users/camasurich/)
 * (@camasurich)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/change-button-text-14/#post-7062368)
 * Would I use the same code to change “Contact me” to “Contact Us”, or is there
   a simpler way?
 *  [WEN Solutions](https://wordpress.org/support/users/wen-solutions/)
 * (@wen-solutions)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/change-button-text-14/#post-7062370)
 * Hello [@camasurich](https://wordpress.org/support/users/camasurich/),
    Yes, you
   can use like the one shown in the above example. Try it and let us know if it
   worked.
 * Thanks,
 *  Thread Starter [hendrys](https://wordpress.org/support/users/hendrys/)
 * (@hendrys)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/change-button-text-14/#post-7062381)
 * I created a child theme and it looks likes the theme works. But I cannot get 
   the translation to work. What do I wrong?
 * functions.php:
 *     ```
       <?php
       add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
       function theme_enqueue_styles() {
           wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
       }
   
       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 'Contact Me' :
   
                       $translated_text = __( 'Neem contact op', 'Bizlight' );
                       break;
   
                       case 'Download Resume' :
   
                       $translated_text = __( 'Mijn CV', 'Bizlight' );
                       break;
               }
   
           }
   
           return $translated_text;
       }
       ?>
       ```
   
 * Do I need to install additional plugins to get it to work?
 *  [WEN Solutions](https://wordpress.org/support/users/wen-solutions/)
 * (@wen-solutions)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/change-button-text-14/#post-7062386)
 * Hello [@hendrys](https://wordpress.org/support/users/hendrys/),
    Can you share
   your site url. You don’t need to install third party plugins to change the button
   texts. The above code is working well on the theme. You can see the output here:
   [http://prnt.sc/acknfs](http://prnt.sc/acknfs)
 * Regards.
 *  Thread Starter [hendrys](https://wordpress.org/support/users/hendrys/)
 * (@hendrys)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/change-button-text-14/#post-7062387)
 * Hello Wen Solutions,
 * The site URL is [https://www.scholing-online.nl](https://www.scholing-online.nl)
 *  [WEN Solutions](https://wordpress.org/support/users/wen-solutions/)
 * (@wen-solutions)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/change-button-text-14/#post-7062388)
 * [@hendrys](https://wordpress.org/support/users/hendrys/), your child theme is
   working well.
    Change the code inside functions.php to as shown below:
 *     ```
       <?php
       add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
       function theme_enqueue_styles() {
           wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
             }
   
       add_filter( 'gettext', 'theme_change_comment_field_names', 20, 3 );
       function theme_change_comment_field_names( $translated_text, $text, $domain ) {
               switch ( $translated_text ) {
   
                   case 'Contact Me' :
                       $translated_text = __( 'Neem contact met mij', 'Biography' );
                       break;
   
                       case 'Download Resume' :
                       $translated_text = __( 'Mijn CV', 'Biography' );
                       break;
               }
             return $translated_text;
       }
       ```
   
 * Let us know how it goes.
    Regards
 *  Thread Starter [hendrys](https://wordpress.org/support/users/hendrys/)
 * (@hendrys)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/change-button-text-14/#post-7062389)
 * This code works, thank you very much!

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

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

 * ![](https://i0.wp.com/themes.svn.wordpress.org/biography/1.3.0/screenshot.png)
 * Biography
 * [Support Threads](https://wordpress.org/support/theme/biography/)
 * [Active Topics](https://wordpress.org/support/theme/biography/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/biography/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/biography/reviews/)

 * 8 replies
 * 4 participants
 * Last reply from: [hendrys](https://wordpress.org/support/users/hendrys/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/change-button-text-14/#post-7062389)
 * Status: resolved