Last active
January 17, 2020 08:52
-
-
Save hostz-frank/50637e3851a6ff6a027ec2958cdcf055 to your computer and use it in GitHub Desktop.
Sprachweiche im Child-Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Angebot-Nachfrage-Buttons nach Sprache ausgeben. | |
*/ | |
add_action( 'wp_footer', function() { | |
if( get_locale() == 'de_DE' ) { ?> | |
<a href="/angebote/" class="sticky-divi-button">Angebote</a> | |
<a href="/anfrage/" class="sticky-divi-button-2">Anfragen</a> | |
<?php } elseif( get_locale() == 'it' ) { ?> | |
<a href="/it/offerta/" class="sticky-divi-button">Offerta</a> | |
<a href="/it/richiesta/" class="sticky-divi-button-2">Richiesta</a> | |
<?php } | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment