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.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| 12:00 – 20:00 | 12:00 – 20:00 | 12:00 – 20:00 | 12:00 – 20:00 | 12:00 – 20:00 | - | - |
| - | - | - | - | - | - | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
This topic contains 1 replies, has 0 voices.
Last updated by Noman 1 month, 2 weeks ago.
Assisted by: Noman.
| Author | Posts |
|---|---|
| October 6, 2025 at 8:19 am | |
|
bastianM-5 |
Background of the issue: Symptoms: Questions: |
| October 6, 2025 at 4:38 pm #17461551 | |
|
Noman WPML Supporter since 06/2016
Languages: English (English ) Timezone: Asia/Karachi (GMT+05:00) |
I followed the below steps: 1. Set the Options Pages (acf-ui-options-page), Post Types (acf-post-type), and Taxonomies (acf-taxonomy) post types to Not Translatable. 2. I noticed that the footer.php file have conditional code which depends on languages that should be removed so that you can add as many languages as you want without modifying the code. So, I replaced the below code from footer.php:
<?php
$lang = apply_filters('wpml_current_language', null);
if (!$lang) { $lang = 'de'; } // fallback
if ( $lang === 'de' ) {
$hide_pre_footer = get_field('pre_footer_hide');
$hide_pre_footer_menus = get_field('hide_pre_footer_menus');
if ( $hide_pre_footer !== 'Yes' ) : ?>
<div id="footer_pageSlider" class="ce ce-mask_teasergroup mt-default mb-default">
<div class="container">
<header>
<h3><?php echo esc_attr(get_field('about_us_title','option')); ?></h3>
</header>
<div class="teaser_slider">
<?php if( have_rows('our_things_repeater','option') ):
while( have_rows('our_things_repeater','option') ): the_row(); ?>
<div class="slide">
<div>
<span><?php the_sub_field('title'); ?></span>
<a href="<?php the_sub_field('page_link'); ?>" target="_blank">
<h6><?php the_sub_field('sub_title'); ?></h6>
</a>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<div class="teaser_navigation_box"></div>
</div>
</div>
<?php endif; ?>
<?php if ( $hide_pre_footer_menus !== 'Yes' ) : ?>
<div id="c1258" class="ce ce-shortcut mt-0 mb-0">
<div class="container">
<div id="c1197" class="ce ce-mask_prefooter mt-default mb-0">
<div class="container">
<?php if ( is_active_sidebar( 'footer_company_widget' ) ) : dynamic_sidebar('footer_company_widget'); endif; ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<footer id="footer">
<div class="container">
<div>
<div>
<?php $footer_logo = get_field('footer_logo','option'); ?>
<img src="<?php echo esc_url($footer_logo); ?>" width="197" height="25" alt="Footer logo">
</div>
<div>
<?php if ( is_active_sidebar('footer_contact_widget') ) : dynamic_sidebar('footer_contact_widget'); endif; ?>
<div>
<?php if ( is_active_sidebar('footer_menu_widget') ) : dynamic_sidebar('footer_menu_widget'); endif; ?>
<!-- ✅ WPML Language Switcher -->
<?php
$languages = apply_filters('wpml_active_languages', null, ['skip_missing'=>0, 'orderby'=>'id']);
$current_lang = apply_filters('wpml_current_language', null);
if ($languages && !empty($languages)) {
echo '<ul id="languageMenu" class="nav">';
foreach ($languages as $code => $language) {
$active = ($code === $current_lang) ? 'active' : '';
echo '<li class="nav-item '.$active.'">';
echo '<a href="'.esc_url($language['url']).'" hreflang="'.esc_attr($language['default_locale']).'" class="nav-link">';
echo '<span>'.esc_html(strtoupper($code)).'</span>';
echo '</a></li>';
}
echo '</ul>';
}
?>
</div>
</div>
</div>
</div>
<div>
<div class="container-fluid"><span>© <?php bloginfo('name'); ?> <?php echo date('Y'); ?></span>
<div>
<?php if( have_rows('linkedin_profile','option') ): while( have_rows('linkedin_profile','option') ): the_row(); ?>
<a href="<?php the_sub_field('linkedin_url'); ?>">
<img alt="LinkedIn Icon" src="<?php echo esc_url(get_sub_field('linkedin_icon')); ?>" width="24" height="24">
</a>
<?php endwhile; endif; ?>
</div>
</div>
<div class="container-fluid">
<div>
<?php if( have_rows('payment_icons','option') ): while( have_rows('payment_icons','option') ): the_row();
$image = get_sub_field('icon');
$filename = pathinfo($image['filename'], PATHINFO_FILENAME);
$capitalized = ucfirst($filename); ?>
<img alt="<?php echo $capitalized; ?> Icon" src="<?php echo $image['url']; ?>" title="<?php echo $capitalized; ?>" width="35" height="25">
<?php endwhile; endif; ?>
</div>
</div>
</div>
</footer>
<?php }
elseif ( $lang === 'en' ) {
$hide_pre_footer = get_field('pre_footer_hide');
$hide_pre_footer_menus = get_field('hide_pre_footer_menus');
if ( $hide_pre_footer !== 'Yes' ) : ?>
<div id="footer_pageSliderEN" class="ce ce-mask_teasergroup mt-default mb-default">
<div class="container">
<header>
<h3><?php echo esc_attr(get_field('footer_title','option')); ?></h3>
</header>
<div class="teaser_slider">
<?php if( have_rows('footer_pages','option') ):
while( have_rows('footer_pages','option') ): the_row(); ?>
<div class="slide">
<div>
<span><?php the_sub_field('footer_page_title'); ?></span>
<a href="<?php the_sub_field('footer_page_link'); ?>" target="_blank">
<h6><?php the_sub_field('footer_footer_text'); ?></h6>
</a>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<div class="teaser_navigation_box"></div>
</div>
</div>
<?php endif; ?>
<?php if ( $hide_pre_footer_menus !== 'Yes' ) : ?>
<div id="c1258" class="ce ce-shortcut mt-0 mb-0">
<div class="container">
<div id="c1197" class="ce ce-mask_prefooter mt-default mb-0">
<div class="container">
<?php if ( is_active_sidebar('footer_company_widget') ) : dynamic_sidebar('footer_company_widget'); endif; ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<footer id="footer">
<div class="container">
<div>
<div>
<?php $footer_logo = get_field('footer_website_logo','option'); ?>
<img src="<?php echo esc_url($footer_logo); ?>" width="197" height="25" alt="Footer website logo">
</div>
<div>
<?php if ( is_active_sidebar('footer_contact_widget') ) : dynamic_sidebar('footer_contact_widget'); endif; ?>
<div>
<?php if ( is_active_sidebar('footer_menu_widget') ) : dynamic_sidebar('footer_menu_widget'); endif; ?>
<!-- ✅ WPML Language Switcher -->
<?php
$languages = apply_filters('wpml_active_languages', null, ['skip_missing'=>0, 'orderby'=>'id']);
$current_lang = apply_filters('wpml_current_language', null);
if ($languages && !empty($languages)) {
echo '<ul id="languageMenu" class="nav">';
foreach ($languages as $code => $language) {
$active = ($code === $current_lang) ? 'active' : '';
echo '<li class="nav-item '.$active.'">';
echo '<a href="'.esc_url($language['url']).'" hreflang="'.esc_attr($language['default_locale']).'" class="nav-link">';
echo '<span>'.esc_html(strtoupper($code)).'</span>';
echo '</a></li>';
}
echo '</ul>';
}
?>
</div>
</div>
</div>
</div>
<div>
<div class="container-fluid"><span>© <?php bloginfo('name'); ?> <?php echo date('Y'); ?></span>
<div>
<?php $linkedin = get_field('footer_linkedin_image','option');
$linkedin_url = get_field('footer_linkedin_url','option'); ?>
<a href="<?php echo $linkedin_url; ?>">
<img alt="LinkedIn Icon" src="<?php echo esc_url($linkedin); ?>" width="24" height="24">
</a>
</div>
</div>
<div class="container-fluid">
<div>
<?php if( have_rows('footer_icon_repeater','option') ): while( have_rows('footer_icon_repeater','option') ): the_row();
$image = get_sub_field('footer_upload_icon');
$filename = pathinfo($image['filename'], PATHINFO_FILENAME);
$capitalized = ucfirst($filename); ?>
<img alt="<?php echo $capitalized; ?> Icon" src="<?php echo $image['url']; ?>" title="<?php echo $capitalized; ?>" width="35" height="25">
<?php endwhile; endif; ?>
</div>
</div>
</div>
</footer>
<?php } ?>
<?php wp_footer(); ?>
</body>
</html>
With:
<?php
$hide_pre_footer = get_field('pre_footer_hide');
$hide_pre_footer_menus = get_field('hide_pre_footer_menus');
if ( $hide_pre_footer !== 'Yes' ) : ?>
<div id="footer_pageSlider" class="ce ce-mask_teasergroup mt-default mb-default">
<div class="container">
<header>
<h3><?php echo esc_attr(get_field('about_us_title','option')); ?></h3>
</header>
<div class="teaser_slider">
<?php if( have_rows('our_things_repeater','option') ):
while( have_rows('our_things_repeater','option') ): the_row(); ?>
<div class="slide">
<div>
<span><?php the_sub_field('title'); ?></span>
<a href="<?php the_sub_field('page_link'); ?>" target="_blank">
<h6><?php the_sub_field('sub_title'); ?></h6>
</a>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<div class="teaser_navigation_box"></div>
</div>
</div>
<?php endif; ?>
<?php if ( $hide_pre_footer_menus !== 'Yes' ) : ?>
<div id="c1258" class="ce ce-shortcut mt-0 mb-0">
<div class="container">
<div id="c1197" class="ce ce-mask_prefooter mt-default mb-0">
<div class="container">
<?php if ( is_active_sidebar( 'footer_company_widget' ) ) : dynamic_sidebar('footer_company_widget'); endif; ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<footer id="footer">
<div class="container">
<div>
<div>
<?php $footer_logo = get_field('footer_logo','option'); ?>
<img src="<?php echo esc_url($footer_logo); ?>" width="197" height="25" alt="Footer logo">
</div>
<div>
<?php if ( is_active_sidebar('footer_contact_widget') ) : dynamic_sidebar('footer_contact_widget'); endif; ?>
<div>
<?php if ( is_active_sidebar('footer_menu_widget') ) : dynamic_sidebar('footer_menu_widget'); endif; ?>
<!-- ✅ WPML Language Switcher -->
<?php
$languages = apply_filters('wpml_active_languages', null, ['skip_missing'=>0, 'orderby'=>'id']);
$current_lang = apply_filters('wpml_current_language', null);
if ($languages && !empty($languages)) {
echo '<ul id="languageMenu" class="nav">';
foreach ($languages as $code => $language) {
$active = ($code === $current_lang) ? 'active' : '';
echo '<li class="nav-item '.$active.'">';
echo '<a href="'.esc_url($language['url']).'" hreflang="'.esc_attr($language['default_locale']).'" class="nav-link">';
echo '<span>'.esc_html(strtoupper($code)).'</span>';
echo '</a></li>';
}
echo '</ul>';
}
?>
</div>
</div>
</div>
</div>
<div>
<div class="container-fluid"><span>© <?php bloginfo('name'); ?> <?php echo date('Y'); ?></span>
<div>
<?php if( have_rows('linkedin_profile','option') ): while( have_rows('linkedin_profile','option') ): the_row(); ?>
<a href="<?php the_sub_field('linkedin_url'); ?>">
<img alt="LinkedIn Icon" src="<?php echo esc_url(get_sub_field('linkedin_icon')); ?>" width="24" height="24">
</a>
<?php endwhile; endif; ?>
</div>
</div>
<div class="container-fluid">
<div>
<?php if( have_rows('payment_icons','option') ): while( have_rows('payment_icons','option') ): the_row();
$image = get_sub_field('icon');
$filename = pathinfo($image['filename'], PATHINFO_FILENAME);
$capitalized = ucfirst($filename); ?>
<img alt="<?php echo $capitalized; ?> Icon" src="<?php echo $image['url']; ?>" title="<?php echo $capitalized; ?>" width="35" height="25">
<?php endwhile; endif; ?>
</div>
</div>
</div>
</footer>
<?php wp_footer(); ?>
</body>
</html>
Now you should be able to update the French language footer text by switching to French language: hidden link Here is a doc for more details: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/translating-the-acf-options-page-custom-fields-with-wpml/ Please let me know if this resolves the issue or if you need further assistance with this issue. Thank you for your cooperation and patience |
The topic ‘[Closed] Footer are not showing on french language’ is closed to new replies.