Forums

Comments without Name = Anonymous? (11 posts)

  1. TauriU
    Member
    Posted 1 year ago #

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

  2. Grateful2
    Member
    Posted 1 year ago #

    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.

  3. TauriU
    Member
    Posted 1 year ago #

    i just what to translate word "Anonymous" into another language

  4. valandil
    Member
    Posted 1 year ago #

    in your comment.php?

  5. TauriU
    Member
    Posted 1 year ago #

    Nop, There's nothing there to edit.

  6. TauriU
    Member
    Posted 1 year ago #

    is it possible?

  7. boyevul
    Member
    Posted 1 year ago #

    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.)

  8. alchymyth
    The Sweeper
    Posted 1 year ago #

    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;
    }
  9. boyevul
    Member
    Posted 1 year ago #

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

  10. alchymyth
    The Sweeper
    Posted 1 year ago #

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

  11. jesseisrad
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.