How to change the label text in default setting pages?

I’ve seen various tutorials on how to modify the menu items of a WordPress Site’s admin, but I’m trying to find a tutorial or way on how to modify the actual admin page labels. Here’s what I mean:

When you are in the back end and you hover over SETTINGS, and click GENERAL, a page comes up with, of course, the general settings for the site. The labels for each input field are as follows: SITE TITLE, TAGLINE, WORDPRESS ADDRESS(URL), SITE ADDRESS(URL), etc.

Read More

I’m looking to add a function to my functions.php for a theme that will allow me to change these labels

Is this even possible? Or do I just have to hard code it in?

Related posts

Leave a Reply

2 comments

  1. You can modify the labels using gettext filter hook ex:

    add_filter( 'gettext', 'theme_change_label_names');
    function theme_change_label_names($translated_text){
        if (is_admin()){
            switch ( $translated_text ) {
    
                case 'Site Title' :
    
                    $translated_text = __( 'New Site Title label', 'theme_text_domain' );
                    break;
    
                case 'Tagline' :
    
                    $translated_text = __( 'new Tagline label', 'theme_text_domain' );
                    break;
            }
    
        }
    
        return $translated_text;
    }
    
  2. There are no filters applied to those labels, hence you cannot change it using a straight forward way. You may have to use a jQuery script for doing so. Don’t hard code it, hard coding in core files is very bad!

    The only things you can change in the General Settings page are the date formats and the time formats.