Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Mohamed Sayed 1 year, 5 months ago.

Author Posts
December 21, 2023 at 7:56 pm #15113307

Sean

When trying to edit existing translations as a custom user role, the pencil icon is greyed out and it shows this message: "You can only edit translations assigned to you"

How do you make the custom user role able to ALWAYS edit all translations, even when not assigned to them.

chrome_LTR3dQ0bHW.png
December 21, 2023 at 9:44 pm #15113415

Mohamed Sayed

Hi Sean,
Thanks for contacting WPML support.

Please create a full backup then add the following code to your theme's functions.php file:

add_filter('wpml_user_can_translate', function ($user_can_translate, $user){
	if (in_array('your_custom_role', (array) $user->roles, true) && current_user_can('translate')) {
		return true;
	}
	
	return $user_can_translate;
}, 10, 2);

Please note that you need to change the your_custom_role part with your custom role name.

Let me know please if that helps.

Kind regards,
Mohamed

The topic ‘[Closed] Certain users cannot edit translations for certain content’ is closed to new replies.