q traslate methods

qtrans_convertURL( 'url' ); //Convert a url in a url?lang=xx

qtrans_generateLanguageSelectCode('image'); // Image

if (qtrans_getLanguage() == ‘en’) {echo ‘IS English’;}

Reference: http://shailan.com/3283/displaying-content-based-on-current-language-using-qtranslate/

Advertisements

Remove adminbar for no admin’s

function remove_admin_bar() {
if (!current_user_can(‘administrator’) && !is_admin()) {
show_admin_bar(false);
}
}
add_action(‘after_setup_theme’, ‘remove_admin_bar’);

 

 

BY: http://www.wpbeginner.com/wp-tutorials/how-to-disable-wordpress-admin-bar-for-all-users-except-administrators/