2

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.

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?

2 Answers 2

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
  • I was worried right off the bat when I read this solution that it wouldn't apply to the p.description directly under the input field for the site description, but "slap me silly and call me susan"....
    – Murphy1976
    Commented Jul 3, 2012 at 14:11
  • Whatever you say Susan :)
    – Bainternet
    Commented Jul 3, 2012 at 15:32
-1

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.

4
  • I kinda figured...
    – Murphy1976
    Commented Jul 3, 2012 at 13:19
  • Yep! :D I think they should give a filter to change the labels and an action to add more fields to this page. Commented Jul 3, 2012 at 13:29
  • Not true at all!!!
    – Bainternet
    Commented Jul 3, 2012 at 13:52
  • Why so? I checked the core file options-reading.php. Is there some other way to do so? Did they add it in 3.4? Cuz I checked 3.1 or so... Commented Jul 4, 2012 at 5:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.