How to change the word Guest to Member?
Quote from jpschwartz on January 29, 2018, 5:09 pmForum topics and replies by guests are attributed to the word “Guest.” I’d like to change that to “Members.” How can I do that?
Forum topics and replies by guests are attributed to the word “Guest.” I’d like to change that to “Members.” How can I do that?
Quote from Asgaros on January 30, 2018, 12:49 pmHello jpschwartz,
you can have a look at the following WordPress-extensions which allows you to change outputs to a custom string without modifying/adding code:
https://de.wordpress.org/plugins/say-what/
Hello jpschwartz,
you can have a look at the following WordPress-extensions which allows you to change outputs to a custom string without modifying/adding code:
Quote from jpschwartz on January 31, 2018, 8:50 pmI’ve looked into the plugin, but I’d be more comfortable with a script to put into functions.php in my child template. Can you suggest one?
Thanks,
Jim
I’ve looked into the plugin, but I’d be more comfortable with a script to put into functions.php in my child template. Can you suggest one?
Thanks,
Jim
Quote from Asgaros on January 31, 2018, 9:09 pmYou can try the following code:
add_filter('ngettext', 'change_ntranslations', 20, 5); add_filter('gettext', 'change_translations', 20, 3); function change_translations($translated_text, $untranslated_text, $domain) { if ($domain === 'asgaros-forum') { switch ($translated_text) { case 'Guest': $translated_text = 'Member'; break; } } return $translated_text; } function change_ntranslations($translation, $single, $plural, $number, $domain) { if ($domain === 'asgaros-forum') { $translation = change_translations($translation, '', 'asgaros-forum'); } return $translation; }
You can try the following code:
add_filter('ngettext', 'change_ntranslations', 20, 5); add_filter('gettext', 'change_translations', 20, 3); function change_translations($translated_text, $untranslated_text, $domain) { if ($domain === 'asgaros-forum') { switch ($translated_text) { case 'Guest': $translated_text = 'Member'; break; } } return $translated_text; } function change_ntranslations($translation, $single, $plural, $number, $domain) { if ($domain === 'asgaros-forum') { $translation = change_translations($translation, '', 'asgaros-forum'); } return $translation; }