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.
|July 2, 2019 at 10:17 am #4125641|
Andre Koebel und
we are using wpml_active_languages to create a custom language switcher. At the moment the function returns "translations" for posts/pages who are not translated yet.
$languages = apply_filters( 'wpml_active_languages', NULL, array( 'skip_missing' => 1 ) );
The language Switcher returns
[en] => Array
But the english Version does not exists. hidden link shows the german Version, but why? It needs to redirect to the home page.
The htaccess Login data are:
|July 2, 2019 at 10:39 am #4125813|
Languages: English (English )
Timezone: Europe/Zagreb (GMT+02:00)
Thank you for contacting WPML support!
According to Debug information you provided:
[custom_posts_sync_option] => Array ( [post] => 1 [page] => 2 [attachment] => 1 [custom_css] => 0 [customize_changeset] => 0 [oembed_cache] => 0 [user_request] => 0 [acf-field-group] => 0 [wpcf7_contact_form] => 0 [casino] => 1 [sidebar] => 0 [wp_block] => 1 [game] => 1 )
This would mean the following - WPML -> Settings -> Post Types Translation -> Pages is set to "Translatable - use translation if available or fallback to default language" (the value of "2" would indicate this). This is in fact this option:
Can you set for both posts and pages to be "Translatable - only show translated items"? Is the issue still there?
|July 2, 2019 at 11:27 am #4126335|
Andre Koebel und
My issue is resolved now. Thank you!