Exclude current language using the custom language switcher code
-
I’m currently using this custom language switcher to display as footer links on my website:
<?php $array = trp_custom_language_switcher(); ?>
<?php if ( apply_filters( 'trp_allow_tp_to_run', true ) ){ ?>
<?php foreach ($array as $name => $item){ ?>
<a href="<?php echo $item['current_page_url']?>">
<span><?php echo $item['language_name']?></span>
</a>  ·  
<?php } ?>
<?php } ?>This works fine, but it displays all languages available. How can I exclude the site’s current language from displaying?
Thanks!
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Exclude current language using the custom language switcher code’ is closed to new replies.