Choosing Which WPML Language Revive Old Posts Shares (Revive Old Posts Lite)

By Default Revive Old Posts Lite (Free) will share the posts of the default language you have set in WPML. If you'd like to instead make Revive Old Posts share in a different language other than your primary you can use the following code below.

Start off by including the following code in either your child theme's functions.php file or create a site-specific plugin(recommended) using the following plugin:  https://wordpress.org/plugins/pluginception/

All you need to add is the plugin name and then copy the code below and enter it into the editing area, after pasting the code save your changes and head over to your Plugins area and activate the plugin to see the changes.

function change_wpml_share_lang(){
	return 'es';
}
add_filter('rop_wpml_lang', 'change_wpml_share_lang');

Be sure to save your changes/activate the site-specific plugin!

The above code will make all shares be Spanish, this is because of the es, German would be de, Italian would be it, and so on. You can find the code for a language by going to WPML->Languages->Site Languages->Edit Languages:

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.