How to create custom backend admin menu in different languages?

You need to use the internationalisation APIs, these let you swap out hardcoded strings for localised versions, e.g. <p>Hello world</p> versus: <p><?php _e( ‘Hello world’, ‘joes_plugin’ ); ?></p> Then, you can use .po/.mo/.pot files to provide alternatives, e.g. a file with french translations, a file with russian etc. You’ll need to declare your translation text … Read more

Gender based user avatar

I managed to come up with the answer 😀 Thanks to @Jos function ht1_change_avatar($args, $id_or_email) { $gender = get_user_meta($id_or_email, ‘user_gender’, true); if($gender==’Male’){ $myavatar=”http://localhost:81/matrimony/wp-content/uploads/2020/04/groom.png”; }else{ $myavatar=”http://localhost:81/matrimony/wp-content/uploads/2020/04/bride.png”; } $args[‘url’] = $myavatar; return $args; } add_filter(‘get_avatar_data’, ‘ht1_change_avatar’, 100, 2);

Lost customization after switching the WordPress theme

WordPress does not keep track of these changes without the help of special 3rd party plugins. It’s too late here, but there are a some precautionary steps before switching a theme: Copy snippets from your current theme (functions.php etc) Write down all analytics and adsense tracking codes Copy sidebar widgets like social links, advertisements, subscription … Read more