Suporte » Desenvolvendo com WordPress » Ajuda configurar cabeçalho no editor

  • Criei um cabeçalho mas estou com dúvida onde inserir o link no editor

    Tema clifden 1.5.5

    Abaixo segue o código do cabeçalho:

    <?php
    if ( wm_option( ‘general-gzip’ ) )
    ob_start( ‘ob_gzhandler’ ); //Enable GZIP

    global $is_opera, $is_IE, $content_width;
    $opera = ( $is_opera ) ? ( ‘ browser-opera’ ) : ( ” );
    $protocol = ( is_ssl() ) ? ( ‘https’ ) : ( ‘http’ );

    //variables
    //post ID
    $postId = ( is_home() ) ? ( get_option( ‘page_for_posts’ ) ) : ( null );
    //theme skin used
    $skinUsed = ( ! wm_option( ‘design-skin’ ) ) ? ( ‘default.css’ ) : ( wm_option( ‘design-skin’ ) );
    //top panel display boolean variable
    $isTopBar = is_active_sidebar( ‘top-bar-widgets’ ) && ! wm_meta_option( ‘no-top-bar’, $postId ) && ! is_page_template( ‘tpl-landing.php’ ) && ! is_page_template( ‘tpl-construction.php’ );

    //body classes
    $bodyClass = ( ‘boxed’ === wm_option( ‘layout-boxed’ ) ) ? ( ‘boxed’ ) : ( ‘fullwidth’ );
    if ( is_page_template( ‘tpl-landing.php’ ) )
    $bodyClass = ( ‘boxed’ === wm_meta_option( ‘landing-boxed’ ) ) ? ( ‘boxed’ ) : ( ‘fullwidth’ );

    //website layout width class
    $bodyClass .= ‘ ‘ . wm_option( ‘layout-width’ );

    //theme skin body classes
    $bodyClass .= ( ! wm_skin_meta( $skinUsed, ‘body-class’ ) ) ? ( ” ) : ( ‘ ‘ . wm_skin_meta( $skinUsed, ‘body-class’ ) );

    //top bar and breadcrumbs
    if ( $isTopBar )
    $bodyClass .= ‘ top-bar-enabled’;
    if ( $isTopBar && wm_option( ‘design-top-bar-fixed’ ) )
    $bodyClass .= ‘ top-bar-fixed’;
    if ( ‘none’ != wm_option( ‘layout-breadcrumbs’ ) && ! wm_meta_option( ‘breadcrumbs’, $postId ) )
    $bodyClass .= ‘ breadcrumbs-‘ . wm_option( ‘layout-breadcrumbs’ );

    //fixed header?
    $bodyClass .= ( is_singular() && isset( $post ) && ( ( ‘none’ != wm_meta_option( ‘slider-type’ ) && wm_meta_option( ‘slider-top’ ) ) || wm_meta_option( ‘map-top’ ) ) ) ? ( ‘ absolute-header’ ) : ( ” );
    if ( false === strstr( $bodyClass, ‘fixed-header’ ) )
    $bodyClass .= ‘ no-fixed-header’;

    //wrap background color class
    $setBgWrap = ( wm_css_background( ‘design-wrap-‘ ) ) ? ( ‘ set-bg’ ) : ( ” );

    //custom in-header styles
    $inHeaderStyles = ”;
    //page background image
    if (
    ( isset( $post ) || is_home() ) &&
    wm_css_background_meta( ‘background-‘ )
    ) {
    $applyOnBodyClass = ( ‘default.css’ !== $skinUsed ) ? ( ‘.boxed’ ) : ( ” );
    $inHeaderStyles .= ( wm_meta_option( ‘background-bg-img-fit-window’, $postId ) ) ? ( ‘body’ . $applyOnBodyClass . ‘ {background:none}’ . “\r\n” ) : ( ‘body’ . $applyOnBodyClass . ‘ {background:’ . wm_css_background_meta( ‘background-‘ ) . ‘}’ . “\r\n” );
    $inHeaderStyles .= ( ! wm_meta_option( ‘background-bg-color’, $postId ) ) ? ( ” ) : ( ‘html {background: none}’ . “\r\n” );
    }
    //roundabout slider settings
    if ( ( isset( $post ) || is_home() ) && ‘roundabout’ === wm_meta_option( ‘slider-type’ ) ) {
    $sliderHeight = ( wm_meta_option( ‘slider-roundabout-height’ ) ) ? ( ‘ height:’ . absint( wm_meta_option( ‘slider-roundabout-height’ ) ) . ‘px !important;’ ) : ( ” );
    $inHeaderStyles .= ‘@media only screen and (min-width: 930px) { .roundabout-slider{width:’ . ( $content_width + intval( wm_meta_option( ‘slider-roundabout-width’ ) ) ) . ‘px !important;’ . $sliderHeight . ‘ margin-left: auto !important; margin-right: auto !important; float: none; margin-top:’ . intval( 50 – wm_meta_option( ‘slider-roundabout-bottom’ ) ) . ‘px !important; margin-bottom:’ . intval( wm_meta_option( ‘slider-roundabout-bottom’ ) ) . ‘px !important;} }’ . “\r\n”;
    }
    //wrapper padding when fixed header skin used
    if ( false != strstr( wm_skin_meta( $skinUsed, ‘body-class’ ), ‘fixed-header’ ) && 0 < wm_option( ‘design-header-height’ ) )
    $inHeaderStyles .= ‘@media only screen and (min-width: 768px) { .wrap { padding-top: ‘ . absint( wm_option( ‘design-header-height’ ) ) . ‘px; } }’ . “\r\n”;

    //header classes
    $headerClasses = ”;
    $headerClasses .= ( wm_css_background( ‘design-header-‘ ) ) ? ( ‘ set-bg’ ) : ( ” );
    $headerClasses .= wm_option( ‘layout-navigation-position’ ) . wm_option( ‘design-header-icons’ );
    ?><!doctype html>

    <!–[if lte IE 7]> <html class=”ie ie7 lie8 lie7 no-js” <?php language_attributes(); ?>> <![endif]–>
    <!–[if IE 8 ]> <html class=”ie ie8 lie8 no-js” <?php language_attributes(); ?>> <![endif]–>
    <!–[if IE 9 ]> <html class=”ie ie9 no-js” <?php language_attributes(); ?>> <![endif]–>
    <!–[if gt IE 9]><!–><html class=”no-js<?php echo $opera; ?>” <?php language_attributes(); ?>><!–<![endif]–>

    <head>
    <!– (c) Copyright <?php bloginfo( ‘name’ ); ?> –>
    <meta charset=”<?php bloginfo( ‘charset’ ); ?>” />
    <?php if ( ! wm_option( ‘general-valid-html’ ) ) { ?>
    <meta http-equiv=”X-UA-Compatible” content=”IE=edge,chrome=1″ />
    <?php } ?>
    <meta name=”robots” content=”<?php
    if ( is_archive() )
    echo wm_option( ‘seo-indexing’ );
    if (
    is_attachment() ||
    ( is_singular() && wm_meta_option( ‘seo-noindex’ ) )
    )
    echo ‘no’;
    ?>index, follow” />

    <!– website title –>
    <title><?php wp_title( ”, true ); ?></title>

    <!– website info –>
    <meta name=”author” content=”<?php if ( ! wm_option( ‘general-website-author’ ) ) echo ‘WebMan – http://www.webmandesign.eu’; else echo wm_option( ‘general-website-author’ ); ?>” />
    <?php
    if ( ! wm_option( ‘seo-metaboxes’ ) ) :
    //Whether to use theme SEO functionality
    $metaParam = ‘description’; //must be like this for SEO plugins not to detect and try to automatically remove – this can be done in theme options
    echo ‘<meta name=”‘ . $metaParam . ‘” content=”‘ . wm_seo_desc() . ‘” />’ . “\r\n”;
    echo ‘<meta name=”keywords” content=”‘ . wm_seo_keywords() . ‘” />’ . “\r\n”;
    if ( ! wm_option( ‘general-valid-html’ ) ) {
    ?>
    <!– Dublin Core Metadata : http://dublincore.org/ –>
    <meta name=”DC.title” content=”<?php bloginfo( ‘name’ ); ?>” />
    <meta name=”DC.subject” content=”<?php bloginfo(‘description’); ?>” />
    <meta name=”DC.creator” content=”WebMan – http://www.webmandesign.eu&#8221; />
    <?php
    }
    endif; //theme SEO enabled?
    ?>

    <?php if ( ‘r930’ === wm_option( ‘layout-width’ ) || ‘r1160’ === wm_option( ‘layout-width’ ) ) : ?>
    <!– mobile viewport –>
    <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″ />

    <?php endif; ?>
    <?php if ( $is_IE ) : ?>
    <!–[if lt IE 9]>
    <script src=”<?php echo $protocol; ?>://html5shiv.googlecode.com/svn/trunk/html5.js”></script>
    <script>window.html5 || document.write(‘<script src=”<?php echo WM_ASSETS_THEME; ?>js/html5.js”><\/script>’)</script>
    <script src=”<?php echo $protocol; ?>://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js”></script>
    <![endif]–>

    <?php endif; ?>
    <!– profile and pingback –>
    <link rel=”profile” href=”http://gmpg.org/xfn/11&#8243; />
    <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>” />

    <!– css stylesheets –>
    <?php
    if ( wm_option( ‘design-font-custom’ ) )
    echo wm_option( ‘design-font-custom’ ) . “\r\n”;
    ?>
    <link rel=”stylesheet” href=”<?php echo WM_ASSETS_THEME; ?>css/style.css.php<?php echo ‘?ver=’ . WM_SCRIPTS_VERSION; ?>” type=”text/css” media=”screen” />

    <!– favicon and apple-touch-icon –>
    <?php wm_favicon(); ?>

    <!– wp_head() –>
    <?php
    wp_head(); //WordPress head hook

    //in-header styles output
    if ( $inHeaderStyles )
    echo ‘<style type=”text/css”>’ . “\r\n” . $inHeaderStyles . ‘</style>’ . “\r\n”;
    ?>
    </head>

    <body id=”top” <?php body_class( $bodyClass ); ?>>
    <?php
    //Background image fit browser window width
    if (
    ( isset( $post ) || is_home() ) &&
    wm_css_background_meta( ‘background-‘ ) &&
    wm_meta_option( ‘background-bg-img-fit-window’, $postId )
    ) {
    $imageURL = wm_meta_option( ‘background-bg-img-url’, $postId );
    $imagePosition = ( ‘fixed’ === wm_meta_option( ‘background-bg-img-attachment’, $postId ) ) ? ( ‘fixed’ ) : ( ‘absolute’ );
    echo ‘<img src=”‘ . $imageURL . ‘” alt=”” style=”position: ‘ . $imagePosition . ‘; width: 100%; left: 0; top: 0; z-index: 0;” />’;
    }

    //TOP BAR
    if ( $isTopBar ) {
    $class = ( wm_option( ‘design-top-bar-fixed’ ) ) ? ( ‘ fixed’ ) : ( ” );

    echo “\r\n\r\n” . ‘<div id=”top-bar” class=”top-bar’ . $class . wm_option( ‘design-toppanel-icons’ ) . ‘”><div class=”wrap-inner”><div class=”twelve pane clearfix”>’ . “\r\n” . ‘<!– TOP BAR –>’ . “\r\n” . ‘‘ . __( ‘Go to main navigation’, ‘clifden_domain’ ) . ‘‘ . “\r\n”;

    wm_sidebar( ‘top-bar-widgets’, ‘widgets’, 2 ); //restricted to 2 widgets

    echo ‘<!– /top-bar –></div></div></div>’ . “\r\n\r\n\r\n”;
    }
    ?>
    <div id=”wrap” class=”wrap<?php echo $setBgWrap; ?>”>

    <header id=”header” class=”clearfix header<?php echo $headerClasses; ?>”>
    <?php
    if ( ! is_page_template( ‘tpl-construction.php’ ) && ‘ nav-top’ === wm_option( ‘layout-navigation-position’ ) )
    //display only when top navigation header layout used and not Under construction template
    get_template_part( ‘nav’ );
    ?>

    <!– HEADER –>
    <div class=”wrap-inner”>
    <div class=”twelve pane clearfix”>

    <?php wm_logo(); ?>

    <?php
    if ( ‘ nav-right’ !== wm_option( ‘layout-navigation-position’ ) || is_page_template( ‘tpl-construction.php’ ) ) {

    //Header right area (display only when rich (normal) header layout used)
    $headerText = wm_option( ‘layout-header-right’ );
    $headerText = ( ‘ ‘ == $headerText ) ? ( ” ) : ( $headerText );

    if ( is_page_template( ‘tpl-landing.php’ ) )
    $headerText = wm_meta_option( ‘landing-header-right’ );
    if ( is_page_template( ‘tpl-construction.php’ ) )
    $headerText = wm_meta_option( ‘construction-header-right’ );

    $replaceArray = array(
    ‘(c)’ => ‘©’,
    ‘(C)’ => ‘©’,

    ‘(r)’ => ‘®’,
    ‘(R)’ => ‘®’,

    ‘(tm)’ => ‘™’,
    ‘(TM)’ => ‘™’,

    ‘YEAR’ => date( ‘Y’ ),
    ‘SEARCH’ => get_search_form( false )
    );
    $headerText = strtr( $headerText, $replaceArray );
    $headerText = do_shortcode( $headerText );

    if ( $headerText )
    echo ‘<div class=”header-right”>‘ . __( ‘Go to main navigation’, ‘clifden_domain’ ) . ‘<div>’ . $headerText . ‘</div></div>’;

    } else {

    get_template_part( ‘nav’ );

    }
    ?>

    </div>
    </div> <!– /wrap-inner –>

    <?php
    if ( ! is_page_template( ‘tpl-construction.php’ ) && ‘ nav-bottom’ === wm_option( ‘layout-navigation-position’ ) )
    //display only when bottom navigation header layout used and not Under construction template
    get_template_part( ‘nav’ );
    ?>
    <!– / header–></header>

    <?php wm_after_header(); ?>

    <div id=”content” class=”content clearfix<?php echo wm_option( ‘design-content-icons’ ); ?>”>
    <!– CONTENT –>

    <?php wm_before_main_content(); ?>

Visualizando 2 respostas - 1 até 2 (de um total de 2)
Visualizando 2 respostas - 1 até 2 (de um total de 2)
  • O tópico ‘Ajuda configurar cabeçalho no editor’ está fechado para novas respostas.