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 thread is resolved. Here is a description of the problem and solution.

Problem: I have added logo code in the child theme. But the logo is not appearing in other languages.

Solution: Solution here: https://wpml.org/forums/topic/logo-does-not-appear-in-other-languages/#post-2863179

This topic contains 8 replies, has 3 voices.

Last updated by renaud-andreT 11 months, 2 weeks ago.

Assigned support staff: Noman.

Author Posts
October 24, 2018 at 3:35 pm #2847106

nunoN-4

Hello,

The logo is not appering in other languages. I try to follow this to get the theme options to translate but I can't find the theme options anywhere: https://wpml.org/documentation/getting-started-guide/translating-theme-options/#finding-the-theme-options-and-making-them-translatable

Any way you can help me out here?

October 25, 2018 at 2:57 pm #2850192

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. Could you please let me know where from you have added logo in your site?
If you have added logo through theme options then please try the follow below steps after taking a backup and let me know how it goes:

1- Go to WPML >> Strings Translation
2- Click the link 'Translate texts in admin screens »' (you'll find it at the bottom of the page)
3) Look for an option similar to "theme_mod", or something like that. Here you should find all strings associated with your theme options.
4) Check the checkbox for your strings of interest.
5) Click on the button "Apply"(at the bottom of the page)
6) Now, all your selected strings should appear in the String Translation panel and you can translate those strings

If still issue persists, please add the debug report in the Debug Information box. I have also enabled debug info box for your next reply: https://wpml.org/faq/provide-debug-information-faster-support/

Thank you

October 25, 2018 at 5:03 pm #2850544

nunoN-4

Hello,

I've done all that, I add the image as translation, check translation complete, and nothing hapens. It says complete bug the logo does not show up.

I've added the debug as requested.

October 26, 2018 at 7:19 am #2852126

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

I have noticed that your website’s WP Memory Limit is 40MB. The WP memory limit needs to be increased, it's different than php memory. PHP memory is fine but WordPress uses 40Mb as default in your site. Minimum requirements for WPML are 128Mb: https://wpml.org/home/minimum-requirements/

Please add this to the top of wp-config.php to increase WP memory:

/* WP Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

If still issue persists, please provide temporary access (WP-Admin and FTP Login info) to your site (preferably staging site), so that I can look into your setup and debug the issue.

Your next answer will be private which means only you and I have access to it.

=== Please backup your database and website ===

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

Thank you

October 29, 2018 at 2:58 pm #2858482

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

This issue is coming from your child theme. Your child theme has static image URL that’s why it’s not working correctly:

<a href="<?php echo get_bloginfo('url'); ?>">
  <img src="<?php echo get_bloginfo('url'); ?>/wp-content/uploads/2017/03/logo-lettering.png" alt="Site Logo" height="35" width="166">
</a>

I’ve tried to update the logo code in your child theme but WP editor showing me error and I could not update the code. I’ve tried to install File Manager plugin to update the code but it doesn’t have enough permission to update the file. So that I need to have FTP access to your site. Could you please provide me your site FTP access so that I can fix this issue. I’ve enabled private input box for your next reply.

Thank you

October 30, 2018 at 2:39 pm #2862235

nunoN-4

Hello,

Can you send me the code to replace so I can go ahead?

If that's not working mark the next one as reply and I'll give you FTP access.

October 30, 2018 at 5:59 pm #2863179

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Here is the code that your parent theme have for dynamic logo. Please replace following code:

<a href="<?php echo get_bloginfo('url'); ?>">
  <img src="<?php echo get_bloginfo('url'); ?>/wp-content/uploads/2017/03/logo-lettering.png" alt="Site Logo" height="35" width="166">
</a>

With:

<?php global $adforest_theme; ?>
        <a href="<?php echo home_url( '/' ); ?>">
            <?php
			if( is_singular( 'ad_post' ) && isset( $adforest_theme['ad_layout_style_modern'] ) && $adforest_theme['ad_layout_style_modern'] == '5' && isset( $adforest_theme['sb_header'] ) &&  $adforest_theme['sb_header'] == 'modern' )
			{
				$logo_url	=	 $adforest_theme['sb_site_logo_for_single']['url'];
			}
			else if( basename( get_page_template() ) == 'page-home.php' && isset( $adforest_theme['sb_header'] ) &&  $adforest_theme['sb_header'] == 'modern'  )
			{
				$logo_url	=	 $adforest_theme['sb_site_logo_for_home']['url'];
			}
            else if( isset( $adforest_theme['sb_site_logo']['url'] ) && $adforest_theme['sb_site_logo']['url'] != "" )
            {
				$logo_url	=	 $adforest_theme['sb_site_logo']['url'];
			}
            else
            {
				$logo_url	=	 esc_url( trailingslashit( get_template_directory_uri () ) ). 'images/logo.png';
            ?>
            <?php
            }
            ?>
               <img src="<?php echo esc_url( $logo_url ); ?>" alt="<?php echo esc_attr__('Site Logo', 'adforest' ); ?>" id="sb_site_logo">
        </a>

And let me know how it goes?

Thank you

November 5, 2018 at 4:12 pm #2877495

nunoN-4

My issue is resolved now. Thank you!

July 26, 2019 at 3:40 pm #4290687

renaud-andreT

Hi Guys,
I am facing the same issue.
I use DIVI theme
Can you please tell me in which file you change the code? (header, function.php, etc.?)
Thanks for your help?