• “Anonymous” is used as the name for comments where such a name was not entered. How can I change “Anonymous” into another word?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Here’s a few for you,

    Jane/John Doe, X, incognito, innominate, nameless, pseudo, pseudonymous, secret, so and so, such and such, unacknowledged, unattested, unavowed, uncredited, undesignated, undisclosed, unidentified, unnamed, unsigned, unspecified, what’s his/her name, whatchamacallit, you know who,

    for starters.

    Thread Starter tauriu

    (@tauriu)

    i just what to translate word “Anonymous” into another language

    in your comment.php?

    Thread Starter tauriu

    (@tauriu)

    Nop, There’s nothing there to edit.

    Thread Starter tauriu

    (@tauriu)

    is it possible?

    In /wp-includes/comment-template.php, look for:

    $author = __('Anonymous');

    Change “Anonymous” to: whatever you want it to be. (You’ll have to re-edit this when WordPress upgrades as it will re-write the file.)

    a:
    if you are using translation files for your wordpress installation, you might be able to find it in there;
    http://codex.wordpress.org/Translating_WordPress

    b:
    you could try and add a filter to functions.php of your theme:

    add_filter('get_comment_author', 'translate_anonymous');
    function translate_anonymous($name) {
    $name = str_replace('Anonymous', 'Other Word', $name);
    return $name;
    }

    Lol, functions are always more elegant than re-writing the base files ^_^

    however, locating the code is always a good first step, as it often leads to the right filter hook to use.

    Never mind, had the wrong functions file! This code works.

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

The topic ‘Comments without Name = Anonymous?’ is closed to new replies.