Hi, Amit here, I am the WPML Support Manager, our current ticket queue is quite calm and I'd like to encourage you to use our new chat support option

We are working hard to debug and look at every single report

All of the known issues are documented in https://wpml.org/known-issues/ you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

We are also adding once a week a tutorial to our YouTube channel - https://www.youtube.com/c/WPML-multilingual - check out if we already covered what you need and leave us a comment if you want us to produce anything there

If you do need to open a ticket please make sure to provide us with all the needed information as described here https://wpml.org/faq/checklist-before-opening-a-ticket-in-wpml-support/

We are very proud at our level of support, we are one team from all over the world and we are all experienced WordPress developers, you can read more about us here - https://wpml.org/forums/supporters/

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 16 replies, has 3 voices.

Last updated by fredf-2 5 years, 2 months ago.

Assigned support staff: Konrad Karpieszuk.

Author Posts
November 3, 2013 at 11:25 am #285937

fredf-2

Could you kindly let me know,

For blogs-mu with BP themes, I should installing to blogs-mu-child, or not?
Where, which line I should to add
<?php do_action('icl_language_selector'); ?>

I tried to add to header.php file,
many time still have error, I did not insert the code at the right place in the header.php file?

Where, which line I should to add

Thanks!

------------------
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html <?php language_attributes(); ?> class="no-js"> <!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="profile" href="hidden link">
<?php include ( TEMPLATEPATH . '/options-var.php' ); ?>

<title>
<?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;

wp_title( '|', true, 'right' );

// Add the blog name.
bloginfo( 'name' );

// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";

// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', TEMPLATE_DOMAIN ), max( $paged, $page ) );

?>
</title>

<?php do_action( 'bp_head' ) ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<?php if( function_exists('font_show')) { font_show(); } ?>

<?php if($bp_existed == 'true') { ?>
<?php if ( function_exists( 'bp_sitewide_activity_feed_link' ) ) : ?>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php _e('Site Wide Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_sitewide_activity_feed_link() ?>" />
<?php endif; ?>
<?php if ( function_exists( 'bp_member_activity_feed_link' ) && bp_is_user() ) : ?>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_displayed_user_fullname() ?> | <?php _e( 'Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_member_activity_feed_link() ?>" />
<?php endif; ?>
<?php if ( function_exists( 'bp_group_activity_feed_link' ) && bp_is_group() ) : ?>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> | <?php bp_current_group_name() ?> | <?php _e( 'Group Activity RSS Feed', 'buddypress' ) ?>" href="<?php bp_group_activity_feed_link() ?>" />
<?php endif; ?>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> <?php _e( 'Blog Posts RSS Feed', 'buddypress' ) ?>" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> <?php _e( 'Blog Posts Atom Feed', 'buddypress' ) ?>" href="<?php bloginfo('atom_url'); ?>" />
<?php } ?>

<!-- automatic-feed-links in functions.php -->
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

<!-- favicon.ico location -->
<?php if(file_exists( WP_CONTENT_DIR . 'https://cdn.wpml.org/favicon.ico?x52277')) { //put your favicon.ico inside wp-content/ ?>
<link rel="icon" href="<?php echo WP_CONTENT_URL; ?>/favicon.ico" type="images/x-icon" />
<?php } elseif(file_exists( TEMPLATEPATH . 'https://cdn.wpml.org/favicon.ico?x52277')) { ?>
<link rel="icon" href="<?php echo get_template_directory_uri(); ?>/favicon.ico" type="images/x-icon" />
<?php } ?>

<!--[if IE 6]>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/_inc/js/drop_down.js"></script>
<style type="text/css">
.item-list li .item-avatar { margin:0 6px 0 0; }
.linkbox { width: 20%; padding-right:3% !important; }
#nav li { behavior: url(<?php echo get_template_directory_uri(); ?>/_inc/js/hover.htc); }
#logo, #right-panel h4, #socials #the-mascot, #socials-single #the-mascot, .img-services, .start-free-small, #footer {
behavior: url(<?php echo get_template_directory_uri(); ?>/_inc/js/iepngfix.htc); }
</style>
<![endif]-->

<?php if($bp_existed == 'true') { ?>
<?php if ( '1' == get_option( 'hide-loggedout-adminbar' ) && !is_user_logged_in() ) { ?>
<?php print "<style type='text/css' media='screen'>"; ?>
body { padding-top: 0px !important;
<?php print "</style>"; ?>
<?php } ?>

<?php if(bp_is_register_page() || bp_is_activation_page()) { ?>
<?php print "<style type='text/css' media='screen'>"; ?>
#content {
border: 0px none !important;
}
#custom #content, #content .padder { width: 96% !important; }
#content .standard-form {
-moz-border-radius-bottomleft:6px;
-moz-border-radius-bottomright:6px;
-moz-border-radius-topleft:6px;
-moz-border-radius-topright:6px;
background:#EEEEEE none repeat scroll 0 0;
border-color:#CCCCCC #999999 #999999 #CCCCCC;
border-style:solid;
border-width:1px;
float:left;
margin:0;
padding:3%;
width:93%;
}
#sidebar { display: none; }
span.label { width: 100%; float: left; }
<?php print "</style>"; ?>
<?php } } ?>

<?php
$body_classes = array();
if( function_exists( 'bp_exists' ) &&
function_exists('bp_use_wp_admin_bar') &&
!bp_use_wp_admin_bar() ){
$body_classes[] = 'buddypress-admin-bar';
}
?>

<?php if($tn_blogsmu_section_one_headline == "" || strstr($_SERVER['REQUEST_URI'], '/wp-signup.php')) { ?>
<?php print "<style type='text/css' media='screen'>"; ?>
#intro-content { background: transparent none !important; }
<?php print "</style>"; ?>
<?php } ?>

<?php if($tn_blogsmu_sidebar_position == "right") { ?>
<?php print "<style type='text/css' media='screen'>"; ?>
#content, #container #post-entry { width: 65% !important; float: left !important; border-right: 1px solid #ddd; border-left: 0px none !important; padding: 0px 30px 35px 0px !important;}
#container #sidebar { float: right !important; }
<?php print "</style>"; ?>
<?php } ?>

<?php wp_head(); ?>

<?php if(is_front_page() || is_home()) {
$feat_style = get_option('tn_blogsmu_featured_blk_option');
if(($feat_style == 'Featured Slider Posts') || ($feat_style == 'Featured Slider Categories') || ($feat_style == 'BP Album Rotate')) { ?>
<script type="text/javascript">
jQuery.noConflict();
var $je = jQuery;
$je(window).load(function() {
$je('#slider').nivoSlider();
});
</script>
<?php } } ?>

<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<?php if (strstr($_SERVER['REQUEST_URI'], '/wp-signup.php')) { ?>
<?php print "<style type='text/css' media='screen'>"; ?>
#content, #post-entry {
border-left: 0px none;
float: left;
padding: 0;
width: 100% !important;
}
.mu_register { width: 92%; padding: 4%; background: #eee; border: 1px solid #ccc; }
<?php print "</style>"; ?>
<?php } ?>

<?php
$forum_root_slug = get_option('_bbp_forum_slug');
$topic_root_slug = get_option('_bbp_topic_slug');
$reply_root_slug = get_option('_bbp_reply_slug');
if( get_post_type() == 'forum' || get_post_type() == $forum_root_slug || get_post_type() == $topic_root_slug || get_post_type() == $reply_root_slug ) { ?>
<?php print "<style type='text/css' media='screen'>"; ?>

<?php if ( !is_active_sidebar( 'bbpress-sidebar' ) ) : ?>
#sidebar, .post-meta { display: none; }
#custom #post-entry { width: 96% !important; padding: 2% !important; border: 0 none !important; }
<?php else: ?>
#container .bb-sidebar { display: inline !important; }
#sidebar, .post-meta { display: none !important; }
<?php endif; ?>

.bbp-forum-info {width: 40%;}
#content fieldset.bbp-form, #container fieldset.bbp-form, #wrapper fieldset.bbp-form { border: 1px solid #ccc;
padding: 10px 20px;
}
.bbp-forums .even, .bbp-topics .even { background: #f8f8f8; }
#container .post-content {width: 100%;}
.bbp-breadcrumb {margin: 0 0 1em 0;}
#bbp_topic_title { width: 70%; }
.bbp-reply-author {width: 30%;}
.bbp-topic-meta {font-size: 0.875em;}
.bbp-reply-author img {margin: 0 1em 0 0;}
#container .bbp-reply-content,#container .bbp-reply-author {padding: 1.4em 1em;}
.bbp-topics td {padding: 1em;}
<?php print "</style>"; ?>
<?php } else { ?>
<?php print "<style type='text/css' media='screen'>"; ?>
#container .bb-sidebar { display: none !important; }
<?php print "</style>"; ?>
<?php } ?>

<!-- start theme options sync - using php to fetch theme option are deprecated and replace with style sync -->
<?php print "<style type='text/css' media='screen'>"; ?>
<?php include (TEMPLATEPATH . '/theme-options.php'); ?>
<?php print "</style>"; ?>

<!-- end theme options sync -->

</head>

<body <?php body_class($body_classes) ?> id="custom">

<div id="top-bg">
<div class="top-bg-inner">
<div class="alignleft">

<?php if($tn_blogsmu_header_logo != "") { ?>
<a href="<?php echo home_url(); ?>"><img src="<?php echo stripslashes($tn_blogsmu_header_logo); ?>" alt="logo" /></a>
<?php } else { ?>
<a href="<?php echo home_url(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/_inc/images/logo.png" alt="logo" /></a>
<?php } ?>
</div>

<?php
if($tn_blogsmu_home_login_block == 'disable') { ?>
<?php } else { ?>
<div class="alignright">
<?php if (is_user_logged_in()) { ?>
<?php if( $bp_existed == 'true' ) { global $bp; //check if bp existed ?>
<div id="li-user">
<div class="user-tab"><?php _e('Welcome back', TEMPLATE_DOMAIN); ?>, <a href="<?php bp_loggedin_user_link() ?>"><?php echo $bp->loggedin_user->fullname; ?></a></div>
</div>
<?php } else {
global $user_ID, $user_identity, $user_url, $user_email;
get_currentuserinfo(); ?>
<div id="li-user"><?php _e('Welcome back', TEMPLATE_DOMAIN); ?>, <a href="<?php echo site_url(); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a> / <?php $mywp_version = get_bloginfo('version'); if ($mywp_version >= '2.7') { ?> <a href="<?php echo wp_logout_url( get_site_url()); ?>"><?php _e('Log out', TEMPLATE_DOMAIN); ?></a> <?php } else { ?> <a href="<?php echo site_url(); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account', TEMPLATE_DOMAIN); ?>"><?php _e('Log out', TEMPLATE_DOMAIN); ?></a> <?php } ?></div>
<?php } ?>
<?php } else { ?>
<?php _e("Already a member?",TEMPLATE_DOMAIN); ?> <a href="<?php echo site_url(); ?>/<?php echo get_members_login_slug(); ?>/"><?php _e("Login here",TEMPLATE_DOMAIN); ?></a>
<?php } ?>
</div>
<?php } ?>
</div>
</div>

<div id="navigation">
<div id="page-navigation">
<?php if ( function_exists( 'wp_nav_menu' ) ) { // Added in 3.0 ?>
<ul id="nav">
<?php if (is_user_logged_in()) { ?>
<?php echo bp_wp_custom_nav_menu($get_custom_location='logged-in-nav', $get_default_menu='revert_wp_menu_page'); ?>
<?php } else { ?>
<?php echo bp_wp_custom_nav_menu($get_custom_location='not-logged-in-nav', $get_default_menu='revert_wp_menu_page'); ?>
<?php } ?>

<?php } else { ?>
<ul id="nav">
<li<?php if(is_front_page()) { echo " id='home'"; } ?>><a href="<?php echo site_url(); ?>" title="<?php _e('Go back to home', TEMPLATE_DOMAIN); ?>"><?php _e('Home', TEMPLATE_DOMAIN); ?></a>
<?php wp_list_pages('title_li=&depth=0'); ?>

<?php } ?>
</div>

<div id="mobile-search">
<?php get_search_form(); ?>
<?php if ( is_user_logged_in() ) : ?>
<?php get_mobile_navigation( $type='top', $nav_name="logged-in-nav" ); ?>
<?php else: ?>
<?php get_mobile_navigation( $type='top', $nav_name="not-logged-in-nav" ); ?>
<?php endif; ?>
</div>

</div>

<?php do_action( 'bp_before_header' ) ?>
<div id="header">
<div id="header-gfx">
<div id="header-gfx-inner">
<?php if( $bp_existed == 'true' ) { //check if bp existed ?>
<?php if ( $bp_front_is_activity == 'true' ) { ?>
<?php
if ( is_front_page() || !bp_current_component() ) {
locate_template ( array('lib/templates/wp-template/panel-home.php'), true );
} else {
locate_template ( array('lib/templates/wp-template/panel-index.php'), true );
custom_img_header_call();
}
?>

<?php } else { ?>

<?php
if(!is_front_page()) {
locate_template ( array('lib/templates/wp-template/panel-index.php'), true );
custom_img_header_call();
} else {
locate_template ( array('lib/templates/wp-template/panel-home.php'), true );
}
?>

<?php } ?>

<?php } else { //if bp not active ?>

<?php
if(is_front_page() && !strstr($_SERVER['REQUEST_URI'], '/wp-signup.php')) {
locate_template ( array('lib/templates/wp-template/panel-home.php'), true );
} else if (strstr($_SERVER['REQUEST_URI'], '/wp-signup.php')) {
locate_template ( array('lib/templates/wp-template/panel-index.php'), true );
} else {
locate_template ( array('lib/templates/wp-template/panel-index.php'), true );
custom_img_header_call();
}
?>

<?php } ?>

</div>
</div>

<?php do_action( 'bp_header' ) ?>

</div>

<?php do_action( 'bp_after_header' ) ?>

<?php if( is_front_page() && !strstr($_SERVER['REQUEST_URI'], '/wp-signup.php') ) {
locate_template ( array('lib/templates/wp-template/sections.php'), true );
} ?>

<div id="wrapper">

<?php do_action( 'bp_before_container' ) ?>

<div id="container">

<?php do_action( 'bp_before_content' ) ?>

<div class="content">

<!-- start content -->

November 3, 2013 at 12:51 pm #285952

Harshad

Dear Fred,

You can add the code just above
<div id="navigation">

November 4, 2013 at 5:06 am #286030

fredf-2

Thank you,Harshad.
I tried still not the right place,please see image.
How to fit it.

You know how to add to Blogis-MU with BP Child themes.

Thanks!

November 4, 2013 at 9:12 am #286133

Harshad

Dear Fred,

The code will not add the language switcher to admin bar, admin bar is only visible when user is logged in.

The code will add language switcher to your sites header area.

November 4, 2013 at 9:59 am #286187

fredf-2

Please where is the best place to add this code to blogs-MU with BP.
You see now is not the right place
which line I should add.

Thank you!

November 4, 2013 at 12:18 pm #286337

Harshad

Dear Fred,

You add language switcher as a widget, there is option available in wpml -> languages -> language switcher options.

You can select the area from available options in the drop down.

November 4, 2013 at 1:20 pm #286388

fredf-2

Please see what I want to do.
Where and which line I should add the code,

Thanks!

November 4, 2013 at 3:51 pm #286523

Konrad Karpieszuk
Supporter

Languages: English (English )

Timezone: Europe/Rome (GMT+01:00)

Dear fredf,

My name is Konrad and I will assist you when we will solve this problem together.

I observe this topic and i think i can help you. If you want to place language switcher at this grey top bar, please instead of pasting this code:

<?php do_action('icl_language_selector'); ?>

paste this:

<?php do_action('icl_language_selector'); ?>
<script>
jQuery('#lang_sel_click').appendTo('#wp-toolbar');
</script>

Place where to paste it is same as Harshad pointed you. Only thing is that you cannot place it in the right side of this grey bar, but directly next to 'Register' link.

Also please be aware that this solution is quite tricky: as Harshad said it is not normal to place language switcher at this admin bar, but it should work.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have

November 4, 2013 at 8:43 pm #286673

fredf-2

Dear Konrad ,

Thank you for kindly support.
I copy the code,paste to there,but the site is same as before.
same image as you see above.
May can not copy,should type?

How to fix it.

Thank you so much!

</div>
<?php } ?>

</div>
</div>
<?php do_action('icl_language_selector'); ?>
<script>
jQuery('#lang_sel_click').appendTo('#wp-toolbar');
</script>

<div id="navigation">
<div id="page-navigation">
<?php if ( function_exists( 'wp_nav_menu' ) ) { // Added in 3.0 ?>
<ul id="nav">
<?php if (is_user_logged_in()) { ?>
<?php echo bp_wp_custom_nav_menu($get_custom_location='logged-in-nav', $get_default_menu='revert_wp_menu_page'); ?>
<?php } else { ?>
<?php echo bp_wp_custom_nav_menu($get_custom_location='not-logged-in-nav', $get_default_menu='revert_wp_menu_page'); ?>
<?php } ?>

November 4, 2013 at 8:51 pm #286679

fredf-2

After log in, dashboard have a language-switcher, that is good, just like that.
why can not see outside?
or outside same like that
Thanks!

November 5, 2013 at 8:53 am #286838

Konrad Karpieszuk
Supporter

Languages: English (English )

Timezone: Europe/Rome (GMT+01:00)

Dear fredf-2,

please change my code into this:

<?php do_action('icl_language_selector'); ?>
<script>
jQuery(document).ready(function($) {
    $('#lang_sel_click').appendTo('#wp-toolbar');
});
</script>

If this will not work, i think we will have to find another place where we can put your language switcher. As I mentioned before, this grey admin bar is not a standard part of your theme.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have

November 5, 2013 at 11:47 am #287017

fredf-2

You are great, Konrad.
Now is go to the place.
But will show the first place have this language-switcher first then go to top place.
Please check
hidden link will go to main site.

Thanks!

November 5, 2013 at 1:10 pm #287075

Konrad Karpieszuk
Supporter

Languages: English (English )

Timezone: Europe/Rome (GMT+01:00)

Yes, this is how it works. This grey bar is added after page is fully loaded. So we have to place this lang. switcher first in this wrong place and very fast move it to another position, on this bar, when bar is presented.

If you want you ca move all this code from header.php file somewhere to footer.php file (for example exactly before </body></html> code) . This will still work, but you will not see this "jump"

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have

November 6, 2013 at 10:00 am #287622

fredf-2

Hi Konrad,
You are so talented!
I move all this code from header.php file somewhere to footer.php file (for example exactly before </body></html> code) . This will still work, but you will not see this "jump"
Just like you said. Now is go to the up place.

Thank you so much. I think many people need that.

Is possible help me
How to add the Multi domains dropdown to

<div id="navigation"> that place, just first place,we add language-switcher.

I have lot of domains alreadly add to the multi domains plugins.
at hidden link when people register,will see the multi domains dropdown.

I want to show multi domains dropdown at the home page.
Let the people know, we have a lot of chose.

I ask a number of people, they don't know how to do it.

Could you kindly let me know how to do it.

Thank you!

November 6, 2013 at 10:35 am #287669

Konrad Karpieszuk
Supporter

Languages: English (English )

Timezone: Europe/Rome (GMT+01:00)

Dear Fred,

Thank you that my solution satisfy you. But about this second question I am affraid that I cannot help You, because this is not related to WPML plugin. I cannot solve things which are out of scope of our support topics. Please look at this document http://wpml.org/purchase/support-policy/

If you want to find help with this kind of things, may I suggest you two links:

http://wordpress.org/support/ - here You can find official WordPress support forum, maybe somebody there will be able to help you
hidden link - if official forum fail, you can consider to find some premium support at this site, I really like it when I have my questions 🙂

Thank you again and I am happy that I helped.