Buongiorno a tutti. Sto lavorando su wordpress con il tema AlterVISTA (Child di Twenty Eleven) e vorrei sapere se esiste un modo per implementare il box di log in all'interno dell'immagine dell'Header come in esempio
Ho già provato a widgettizzare la header ma riesco solamente ad inserire il box di login o sopra o sotto l'immagine. Qualche suggerimento?
Codice PHP:
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
global $is_mobile;
$avtheme_slider_options = get_option('avtheme_slider_options');
$avtheme_mobile_options = get_option('avtheme_mobile');
$is_mobile = avtheme_check_mobile_browser();
?><!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<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', AVTHEME ), max( $paged, $page ) );
?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php
/* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
* as styles, scripts, and meta tags.
*/
wp_enqueue_script('slider.js');
wp_head();
?>
<?php if($is_mobile) : ?>
<script type="text/javascript">
av_toolbar_off = 1;
</script>
<?php endif; ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed">
<header id="branding" role="banner">
<?php if($is_mobile) : ?>
<div id="mobile-nav" class="clearfix">
<?php
if(!empty($avtheme_mobile_options['logo_img'])) {
$image_url = $avtheme_mobile_options['logo_img'];
} else {
$image_url = get_stylesheet_directory_uri().'/images/home.png';
}
?>
<a id="mobile-logo-icon-link" href="<?php bloginfo( 'url' ); ?>" <?php if(!$avtheme_mobile_options['show_logo']) echo 'style="display:none;"'; ?> >
<img id="mobile-logo-icon" src="<?php echo $image_url; ?>" alt="" />
</a>
<a id="mobile-logo-title" href="<?php bloginfo( 'url' ); ?>">
<?php bloginfo( 'site_title' ); ?>
</a>
<a id="mobile-menu-toggle" class="no-ajax" href="#">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/menu_toggle_icon.png" alt="menu image" />
</a>
</div>
<div id="mobile-menu" class="clearfix">
<!-- The Hidden Search Bar -->
<div id="mobile-search-bar">
<div id="wptouch-search-inner">
<form method="get" id="mobile-searchform" action="<?php bloginfo( 'search_url' ); ?>/">
<input type="text" name="s" id="search-input" tabindex="1" placeholder="<?php _e( 'Search', AVTHEME ); ?>…" />
<input name="submit" type="hidden" id="search-submit-hidden" tabindex="2" />
</form>
</div>
</div>
<!-- The WPtouch Tab-Bar // includes Page Menu -->
<?php get_template_part( 'menu', 'mobile' ); ?>
</div>
<?php else: ?>
<nav id="access" class="clearfix" role="navigation">
<h3 class="assistive-text"><?php _e( 'Main menu', AVTHEME ); ?></h3>
<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff. */ ?>
<div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to primary content', AVTHEME ); ?>"><?php _e( 'Skip to primary content', AVTHEME ); ?></a></div>
<div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( 'Skip to secondary content', AVTHEME ); ?>"><?php _e( 'Skip to secondary content', AVTHEME ); ?></a></div>
<?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- #access -->
<hgroup class="clearfix">
<?php if ( is_singular() ) : ?>
<h2 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h2>
<h3 id="site-description"><?php bloginfo( 'description' ); ?></h3>
<?php else : ?>
<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
<h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php endif; ?>
</hgroup>
<?php endif; ?>
<?php
if( strcmp($avtheme_slider_options['slider'],'large') == 0 || $avtheme_slider_options['slider'] == 1) {
get_template_part( 'slider' );
}
if(strcmp($avtheme_slider_options['slider'], 'none') == 0 || !$avtheme_slider_options['slider']) :
// Check to see if the header image has been removed
$header_image = get_header_image();
if ( ! empty( $header_image ) && !$is_mobile) :
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<img src="<?php header_image(); ?>" />
</a>
<?php endif; // end check for removed header image ?>
<?php endif; ?>
</header><!-- #branding -->
<div id="main" class="clearfix">
<div id="widgetized-header">
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('header')) : else : ?>
<div class="pre-widget">
<!--messaggio alternativo -->
</div>
<?php endif; ?>
</div>
Grazie!