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 Carlos Rojas 8 months, 1 week ago.

Assigned support staff: Carlos Rojas.

Author Posts
September 23, 2019 at 3:33 am #4620097


Hi there,

I upload my theme and wanted to add this code to functions.php again, it always worked on the older version:

add_filter( 'icl_post_alternative_languages', 'custom_post_alternative_languages' );
function custom_post_alternative_languages($out) {
if( is_single() ) {
return $out;


But now it gives me an error, I put the code in Visual Studio Code and it says there is nothing wrong.

In picture 2 you can see the problem, why I earlier asked for a code.

And why is my flag not showing in the menu??

Please help me out.

September 23, 2019 at 9:43 am #4622049

Carlos Rojas

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Thank you for contacting WPML support.

1.- Could you tell what is the error you are getting? Also, could you activate the debug mode by following this steps: and share any error messages that might appear in the debug.log file which is within wp-content folder?

2.- Please provide the debug information of the site. In this link you will find the steps to follow:

Kind regards,