<?php if ( ICL_LANGUAGE_CODE=='it' ) : ?>
Your Tag
<?php Your Code ?>
<?php endif; ?>
<?php if ( ICL_LANGUAGE_CODE=='fr' ) : ?>
Your Tag
<?php Your Code ?>
<?php endif; ?>
<?php if ( defined( 'ICL_LANGUAGE_CODE' ) && 'fr' == ICL_LANGUAGE_CODE ) { // If the language is French ?>
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/fr_logo.png" class="site-logo" alt="" />
<?php } elseif( defined( 'ICL_LANGUAGE_CODE' ) && 'it' == ICL_LANGUAGE_CODE ) { // If the language is Italian ?>
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/it_logo.png" class="site-logo" alt="" />
<?php } else { // If the language is English, the default ?>
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/en_logo.png" class="site-logo" alt="" />
<?php } ?>
- bavotasan.com | Displaying Different Logos with WPML (ICL_LANGUAGE_CODE) : https://bavotasan.com/2016/displaying-different-logos-wpml/
- WPML | Change logo per language (ICL_LANGUAGE_CODE) : https://wpml.org/forums/topic/change-logo-per-language/
- WPML | logo in different language (ICL_LANGUAGE_CODE) : https://wpml.org/forums/topic/logo-in-different-language/
- WPML | how to get different headers with different languages (ICL_LANGUAGE_CODE, language_attributes()) : https://wpml.org/forums/topic/how-to-get-different-headers-with-different-languages/
- WordPress Codex | Function Reference/language attributes : https://codex.wordpress.org/Function_Reference/language_attributes
- WordPress Developer Resources | Function | get_language_attributes() : https://developer.wordpress.org/reference/functions/get_language_attributes/
- WordPress Developer Resources | Function | get_bloginfo() : https://developer.wordpress.org/reference/functions/get_bloginfo/
- Language : en-US, ko-KR
'WordPress > Action Hook, Filter Hook, Function' 카테고리의 다른 글
워드프레스 검색결과 개수 표시 (Display Total Results) (0) | 2023.03.28 |
---|---|
워드프레스 guid 변경 쿼리문 (0) | 2023.03.22 |
[WordPress] Conditional Tags (0) | 2018.12.24 |
[Wordpress] get_the_id(), the_ID(), get_current_blog_id() (0) | 2018.12.24 |
[Wordpress] WooCommerce Visual Hook Guide: Single Product Page (0) | 2018.12.13 |