Salve, ho un problema... ho creato un sito multilanguage con wordpress usando il plugin apposito qTranlsate... questo di suo posiziona le bandierine del cambio lingua nel widget del tema... a me serve posizionarle sulla home.
Ho cercato in vari forum e guide ed ho trovato questa indicazione:
Per visualizzare le bandierine e link per il cambio lingua potete utilizzare l‘apposito widget oppure inserire nel vostro tema questo codice php:
<?php do_action('icl_language_selector'); ?>
Ho provato ad inserirlo nel file header.php come suggerito... in varie posizioni ma nella home non appare nulla... non so se vada inserito così semplice o accompagnato da altri codici non ne ho la più pallida idea.. qualcuno sa essermi di aiuto? grazie
incollo di seguito il codice del mio file header.php:
codice:
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="initial-scale=1.0,width=device-width" />
<title><?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?></title>
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php
//OptionTree Stuff
if ( function_exists( 'get_option_tree') ) {
$theme_options = get_option('option_tree');
$light = get_option_tree('light',$theme_options);
$googleApi = get_option_tree('google_api',$theme_options);
$googleKeyword = get_option_tree('google_keyword',$theme_options);
$logo = get_option_tree('logo',$theme_options);
$footerText = get_option_tree('footer_text',$theme_options);
$color = get_option_tree('color',$theme_options);
$favicon = get_option_tree('favicon',$theme_options);
$css = get_option_tree('css',$theme_options);
}
?>
<?php if($favicon) { ?><link rel="icon" href="<?php echo $favicon; ?>" type="image/x-icon" /><?php } ?>
<?php if($googleApi) { echo $googleApi; } ?>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<?php if($light){?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/light.css" type="text/css" media="screen" />
<?php } ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/scripts/prettyPhoto.css" type="text/css" media="screen" />
<?php
//IF iPhone/iPod, LOAD iPhone CSS FILE
if (ereg('iPhone',$_SERVER['HTTP_USER_AGENT'])) {$iphone = 1;}
elseif (ereg('iPod',$_SERVER['HTTP_USER_AGENT'])) {$iphone = 1;}
else {$iphone = 0;}
if ($iphone == '1') { ?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/iphone.css" type="text/css" media="screen" />
<?php } ?>
<style>
a {color: <?php echo $color;?>;}
<?php if($googleKeyword){?>body {font-family: '<?php echo $googleKeyword;?>', sans-serif;}<?php } ?>
<?php echo $css;?>
</style>
<?php
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"), false, '');
wp_enqueue_script('jquery');
wp_head();
if ( is_singular() ) wp_enqueue_script( "comment-reply" );
?>
<!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js" type="text/javascript"></script>
<![endif]-->
</head>
<body <?php body_class();?>>
<div id="loading"></div>
<div id="pageContent">
<?php if(is_page() || is_single()){$args = array('post_type' => 'attachment','post_mime_type' => 'image' ,'post_status' => null, 'post_parent' => $post->ID ); $attachments = get_posts($args);}?>
<ul id="navBox" <?php if(!is_page_template('page_gallery.php')){?>class="openNav"<?php }?>>
<li id="homeNav">activeNav<?php }?>">MENU
<li id="contentNav">
activeNav<?php }?>"><?php if(is_search() || is_archive() || is_home()){?>LIST<?php } else { ?>INFO<?php } ?>
<?php if ($attachments) { ?>
<li id="galleryNav">THUMBS
<?php } if ( is_dynamic_sidebar() ) { ?>
<li id="widgetNav">MORE
<?php } ?>[/list]
<div id="homeBox" class="boxStuff<?php if(is_front_page() && !is_page_template('page_gallery.php')){?> activeBox<?php }?>">
[img]<?php echo $logo;?>[/img]" />
<?php if (has_nav_menu( 'main' ) ) { wp_nav_menu(array('theme_location' => 'main', 'container_id' => 'navigation', 'menu_id' => 'dropmenu')); }?>
<div id="copyright">
© <?php echo date("Y "); bloginfo('name'); ?>. <?php echo $footerText;?>
</div>
</div>