Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Alex Gor

    (@alexgff)

    @mseedorff
    do you want to make your own language selector without using widget?

    Thread Starter mseedorff

    (@mseedorff)

    I don’t know how to code my own language selector but if I could get the code that can do the work, that would be the best solution!

    But I guess a working widget could do the job as well..

    Plugin Contributor Alex Gor

    (@alexgff)

    you can use next code

    if ( class_exists( 'WPGlobus' ) ) {	?>
      <div class="wpglobus-selector" style="float:right;margin-right:10px;">
    	<?php	foreach( WPGlobus::Config()->enabled_languages as $lang ) {
    	$flag = WPGlobus::Config()->flags_url . WPGlobus::Config()->flag[ $lang ];
    	if( $lang == WPGlobus::Config()->language ) {
    	   echo '<span style="margin-right:10px;">';
    	   echo WPGlobus::Config()->language_name[ $lang ];
    	   echo '?<img src="' . $flag . '" /> ';
    	   echo '</span>';
    	} else {
    	  echo '<span style="margin-right:10px;">';
    	  echo '<a href="' . WPGlobus_Utils::localize_current_url( $lang ) . '">';
    	  echo WPGlobus::Config()->language_name[ $lang ];
    	  echo '?<img src="' . $flag . '" /> ';
    	  echo '</a>';
    	  echo '</span>';
    	}
        } ?>
      </div> 	<?php
    }

    Thread Starter mseedorff

    (@mseedorff)

    For some reason it won’t work..

    Is there a ‘Custom CSS’ code to remove the flags?

    Plugin Contributor Alex Gor

    (@alexgff)

    what is your site url?

    Thread Starter mseedorff

    (@mseedorff)

    Plugin Contributor Alex Gor

    (@alexgff)

    to hide flags you can use css rule

    .wpglobus-selector-link img {
      display:none;
    }

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘menu problem. List view without flags’ is closed to new replies.