Replace LOGIN with WPML language switcher

Modern, responsive, unique and elegant one-page WordPress theme to showcase your creativity
GK User
Wed Jan 22, 2014 12:04 pm
Hello,
My site is multilingual and I would like to replace the "LOGIN" button at the navbar with a WPML Language Switcher or just "ES | EN | DE" for the 3 languages used at website. Any easy way, before I start messing with the code on my own?

Many thanks in advance

Marc
User avatar
Fresh Boarder

GK User
Thu Jan 23, 2014 8:14 am
Hi,

Code from login button is placed in Creativity/layouts/header.php file :
Code: Select all
<div id="gk-user-area">
            <?php if(get_option($tpl->name . '_login_link', 'Y') == 'Y') : ?>
            <a href="<?php echo get_option($tpl->name . '_login_url', 'wp-login.php?action=login'); ?>" id="gk-login" class="btn border"><?php (!is_user_logged_in()) ? _e('Log In', GKTPLNAME) : _e('Logout', GKTPLNAME); ?></a>
            <?php endif; ?>
         </div>


You can put your code from Language Switcher inside gk-user-area div, or you can create another widget area inside this gk-user-area div and then put widget with wpml switcher there:
http://www.gavick.com/documentation/wor ... ess-theme/
User avatar
Moderator


cron