Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are setting up a language switcher using WPML on your site under development, but the flags are not showing.
Solution:
The issue might be due to the missing "wp_icl_flags" database table. Here's how you can address this:
1. Ensure you back up your site first for safety.
2. Insert the following code at the bottom of the functions.php file in your theme's root folder:

function wpml_fix_missing_icl_tables() {
  
    if( function_exists( 'icl_sitepress_activate' ) )
  
        icl_sitepress_activate();
  
}
  
add_action( 'wp_footer', 'wpml_fix_missing_icl_tables' );

3. After adding the code, visit your site's homepage at least once.
4. Remove the code afterward.
If the problem persists, we may need to install the wp phpMyAdmin plugin on your site to add the missing database table.

Please note that this solution might be outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue continues, please open a new support ticket.

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.

Tagged: 

This topic contains 12 replies, has 2 voices.

Last updated by mohamedM-67 1 year, 1 month ago.

Assisted by: Noman.

Author Posts
June 25, 2024 at 12:40 pm #15820730

mohamedM-67

Thank you so much sir.