@kurtko
if ( class_exists( 'WPGlobus' ) ) {
foreach( WPGlobus::Config()->enabled_languages as $l ){
if( $l == WPGlobus::Config()->language ) {
echo '<span>'.$l.'</span>';
} else {
echo '<a href="' . WPGlobus_Utils::localize_current_url($l). '">';
echo $l;
echo '</a>';
}
}
}
Can you add flag to this code?
That will be awsome 🙂
if ( class_exists( 'WPGlobus' ) ) {
foreach( WPGlobus::Config()->enabled_languages as $l ){
if( $l == WPGlobus::Config()->language ) {
echo '<span>'.$l.'</span>';
} else {
echo '<a href="localize_current_url($l). '">';
echo $l;
echo '</a>';
}
}
}
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code has now been damaged by the forum’s parser.]
@wantedjk
with flag for example
if ( class_exists( 'WPGlobus' ) ) {
foreach( WPGlobus::Config()->enabled_languages as $l ){
$flag = WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ $l ];
if( $l == WPGlobus::Config()->language ) {
echo '<span>'.$l.'</span>';
} else {
echo '<a href="localize_current_url($l). '">';
echo '<img src="' . $flag . '" /> ' . $l;
echo '</a>';
}
}
}
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]
I want to achieve the same thing.
Flag | Flag
No dropdown. How can I achieve this, and in what file?
I don’t have this. As i don’t have WPGlobus plus.
Will i be able to achieve this in de normal version?
WPGlobus Plus was specially created to extend main WPGlobus functionality