Visualizzazione risultati 1 fino 1 di 1

Discussione: inserire banner nell'intestazione

  1. #1
    Guest

    Predefinito inserire banner nell'intestazione

    Ciao a tutti! Vorrei inserire un banner nell'intestazione del mio sito su wordpress, qualcuno è in grado di aiutarmi?
    Il tema in uso è NewsOnline, acquistato su MyThemeShop

    il codice dell'header è questo:


    Codice PHP:
    <!DOCTYPE html>
    <?php $mts_options = get_option(MTS_THEME_NAME); ?>
    <html class="no-js" <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo('charset'); ?>">
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <?php mts_meta(); ?>
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php wp_head(); ?>
    <meta name="specificfeeds-verification-code" content="ypCsBWDwJXPZtKPkegyn"/>
    </head>

    <body id="blog" <?php body_class('main'); ?> itemscope itemtype="http://schema.org/WebPage">
    <div class="main-container">
    <?php if ( empty($mts_options['mts_header_color_scheme_show_hide']) ) {
    $header_bg = 'background: transparent;';
    } elseif (
    $mts_options['mts_header_color_scheme_show_hide'] == 1 ) {
    $header_bg = 'background: '.$mts_options['mts_header_color_scheme'].'; padding-bottom: 30px;';
    }
    ?>
    <header class="main-header" role="banner" itemscope itemtype="http://schema.org/WPHeader" style="<?php if(isset($header_bg)) { echo $header_bg; } ?>">
    <?php if ( !empty($mts_options['mts_show_primary_nav']) ) { ?>
    <div class="container">
    <div class="primary-navigation" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
    <nav id="navigation" class="clearfix<?php if ( $mts_options['mts_show_secondary_nav'] !== '1' ) echo ' mobile-menu-wrapper'; ?>">
    <?php if ( has_nav_menu( 'primary-menu' ) ) { ?>
    <?php wp_nav_menu( array( 'theme_location' => 'primary-menu', 'menu_class' => 'menu clearfix', 'container' => '', 'walker' => new mts_menu_walker ) ); ?>
    <?php } else { ?>
    <ul class="menu clearfix">
    <?php wp_list_pages('title_li='); ?>
    </ul>
    <?php } ?>
    </nav>
    <?php if ( !empty($mts_options['mts_header_button']) && !empty($mts_options['mts_header_button_link']) ) { ?>
    <a href="<?php echo $mts_options['mts_header_button_link']; ?>" class="top-nav-button" style="background:<?php echo $mts_options['mts_header_button_bg']; ?>"><?php echo $mts_options['mts_header_button_text']; ?></a>
    <?php } ?>
    </div>
    </div>
    <?php } ?>

    <div id="header">
    <div class="container">
    <div class="logo-container">
    <div class="logo-wrap">
    <?php if ($mts_options['mts_logo'] != '') { ?>
    <?php if( is_front_page() || is_home() || is_404() ) { ?>
    <h1 id="logo" class="image-logo" itemprop="headline">
    <a href="<?php echo home_url(); ?>"><img src="<?php echo $mts_options['mts_logo']; ?>" alt="<?php bloginfo( 'name' ); ?>"<?php if (!empty($mts_options['mts_logo2x'])) { echo ' data-at2x="'.$mts_options['mts_logo2x'].'"'; } ?>></a>
    </h1><!-- END #logo -->
    <?php } else { ?>


    <h2 id="logo" class="image-logo" itemprop="headline">
    <a href="<?php echo home_url(); ?>"><img src="<?php echo $mts_options['mts_logo']; ?>" alt="<?php bloginfo( 'name' ); ?>"<?php if (!empty($mts_options['mts_logo2x'])) { echo ' data-at2x="'.$mts_options['mts_logo2x'].'"'; } ?>></a>
    </h2><!-- END #logo -->
    <?php } ?>
    <?php } else { ?>
    <?php if( is_front_page() || is_home() || is_404() ) { ?>
    <h1 id="logo" class="text-logo" itemprop="headline">
    <a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a>
    </h1><!-- END #logo -->
    <?php } else { ?>
    <h2 id="logo" class="text-logo" itemprop="headline">
    <a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a>
    </h2><!-- END #logo -->
    <?php } ?>
    <div class="site-description" itemprop="description">
    <?php bloginfo( 'description' ); ?>
    </div>
    <?php } ?>
    </div>
    <?php dynamic_sidebar('Header Ad'); ?>
    </div>
    <?php
    $secondary_nav_bg
    = 'background: '.$mts_options['mts_secondary_nav_color_scheme'].';';
    ?>
    <?php if ( $mts_options['mts_show_secondary_nav'] == '1' ) { ?>
    <div class="secondary-navigation" role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement" style="<?php if(isset($secondary_nav_bg)) { echo $secondary_nav_bg; } ?>">
    <a href="#" id="pull" class="toggle-mobile-menu"><?php _e('Menu','mythemeshop'); ?></a>
    <nav id="navigation" class="clearfix mobile-menu-wrapper">
    <?php if ( has_nav_menu( 'secondary-menu' ) ) { ?>
    <?php wp_nav_menu( array( 'theme_location' => 'secondary-menu', 'menu_class' => 'menu clearfix', 'container' => '', 'walker' => new mts_menu_walker ) ); ?>
    <?php } else { ?>
    <ul class="menu clearfix">
    <?php wp_list_categories('title_li='); ?>
    </ul>
    <?php } ?>
    </nav>
    <div class="search-style-one">
    <a id="trigger-overlay">
    <i class="fa fa-search"></i>
    </a>
    <div class="overlay overlay-slideleft">
    <div class="container">
    <div class="search-row">
    <button type="button" class="overlay-close">X</button>
    <?php get_search_form(); ?>
    </div>
    </div>
    </div>
    </div>
    </div>
    <?php } ?>
    <?php if ( $mts_options['mts_ticker'] == '1' ) { ?>
    <div class="navigation-trending">
    <div class="trending"><?php _e('Now Trending', 'mythemeshop'); ?></div>
    <div class="trending-slider-container clearfix loading">
    <ul id="slider" class="trending-slider">
    <?php if ( empty( $mts_options['mts_ticker_cat'] ) || !is_array( $mts_options['mts_ticker_cat'] ) ) {
    $mts_options['mts_ticker_cat'] = array('0');
    }

    $slider_cat = implode( ",", $mts_options['mts_ticker_cat'] );
    $slider_query = new WP_Query('cat='.$slider_cat.'&posts_per_page='.$mts_options['mts_ticker_num']);
    while (
    $slider_query->have_posts() ) : $slider_query->the_post();
    ?>
    <li>
    <a href="<?php the_permalink() ?>">
    <?php the_title(); ?>
    </a>
    </li>
    <?php endwhile; wp_reset_query(); ?>
    </ul>
    </div><!-- .primary-slider-container -->
    </div>
    <?php } ?>
    </div><!--#header-->
    </div><!--.container-->
    </header>


    Grazie!
    Ultima modifica di karl94 : 10-05-2015 alle ore 18.00.44 Motivo: Formattazione del codice PHP

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •