WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] rename site admin link (15 posts)

  1. killaja
    Member
    Posted 7 years ago #

    Hello. Can anyone tell me how to rename the "Site Admin" link in the side bar? I want to call it "Control Panel" instead.

    Thanks.
    Jordan

  2. anela
    Member
    Posted 7 years ago #

    What theme are you using?

    Take a look at your sidebar.php in the theme's folder.

  3. killaja
    Member
    Posted 7 years ago #

    I am using the default theme.

  4. cielogrande
    Member
    Posted 7 years ago #

    I was just about to ask the same question as did killaja who started this thread. I don't think renaming the link is as simple as substituting new text into the sidebar.php file because what is dsiplayed is dependent on whether the user is logged-in or not logged-in. Am I correct on this guess?
    If I am, then maybe what is displayed on the sidebar is determined by code on another php file? If so, where would this found?
    Thanks, DB~

  5. cielogrande
    Member
    Posted 7 years ago #

    Any ideas, folks???
    DB~

  6. Chris_K
    Member
    Posted 7 years ago #

    What you're looking for is the tag wp_loginout(). Documentation for it http://codex.wordpress.org/Template_Tags/wp_loginout

    As noted, you don't get to change the wording without hacking core files.

    However, why not just remove it and replace it with something like:
    <a href="http://domain.com/blog/wp-login.php">Control Panel</a> ?

  7. cielogrande
    Member
    Posted 7 years ago #

    HandySolo-
    Thank you... your solution sounds easy. I'm still not sure, however, on what .php file the "tag_loginout()" information you referred to is located. Could you point me in the direction of that file please?
    Thanks!!! DB~

  8. Chris_K
    Member
    Posted 7 years ago #

    Odds are, you want to be looking in your theme's sidebar.php.

  9. killaja
    Member
    Posted 7 years ago #

    HandySolo. I found that "wp_loginout()" tag in my sidebar.php file. However, it looks like replacing that will rename the Login/Logout link and not the "Site Admin" link.

  10. Chris_K
    Member
    Posted 7 years ago #

    My apologies. wp_register() is probably right around the same spot.

    - http://codex.wordpress.org/Template_Tags/wp_register

  11. killaja
    Member
    Posted 7 years ago #

    Ok that worked. I replaced the entire wp_register tag with this:

    Control Panel

    Now while this works, there is a downside. Doing this will cause you to ALWAYS see this "Control Panel" link, whether you are logged in or out and you will never get the "Register" link which normally replaces the Site Admin link when you are not logged in.

    However, I found THE solution (very proud of myself). You need to edit the "template-functions-general.php" file found in your "wp-includes" folder. Open the file and look for the following line:

    $link = $before . '' . __('Site Admin') . '' . $after;

    Replace the text 'Site Admin' with whatever you want to call your link. In my case, I put 'Control Panel' . Save and voila, the title has been changed.

  12. killaja
    Member
    Posted 7 years ago #

    ^^^ ugh, how do I stop it from rendering the bits of code in my explanation above?

  13. cielogrande
    Member
    Posted 7 years ago #

    killaja- Thank you so much for your "detective" work. Sifting through the endless PHP files in WordPress can be a daunting task, so I admire your efforts in finding the appropriate code to tweak.
    THANKS AGAIN!!!!
    DB~

  14. aarock
    Member
    Posted 7 years ago #

    Just to update this for new version users, you want to update the wp-includes/general-template.php at line#49:

    $link = $before . '' . __('Site Admin') . '' . $after;

  15. skiorski
    Member
    Posted 7 years ago #

    Thanks killaja for finding this bit in the first place and to aarock for guiding me to the file name which has changed for WP2.2

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags