在header.php Wordpress

时间:2016-07-25 15:12:29

标签: php html wordpress

我试图在this site上的徽标右侧添加一些联系方式。

目前它正显示在徽标下方。我还想更改字体和颜色以匹配导航栏。

这里是header.php的代码,用于显示我对网站所做的操作。 我也知道劳拉(主人)应该使用儿童主题,但她的丈夫建立了网站并且已经做了很多没有孩子的工作,所以为这一次改变建立一个似乎是多余的?

<!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js" >
<!-- start -->
<head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="format-detection" content="telephone=no">

    <!-- set faviocn-->
    <?php 
    global $pmc_data; 
    $favicon = ''; 
    if(isset($pmc_data['favicon']))
        $favicon = $pmc_data['favicon'];
    if (empty($favicon)) { $favicon = get_template_directory_uri() .'/images/favicon.ico'; }    
    ?>

    <!-- set title of the page -->
    <title>
    <?php
    global $page, $paged;
    wp_title( '|', true, 'right' );
    bloginfo( 'name' );
    $site_description = get_bloginfo( 'description', 'display' );
    if ( $site_description && ( is_home() || is_front_page() ) )
        echo " | $site_description";
    if ( $paged >= 2 || $page >= 2 )
        echo ' | ' . sprintf( 'Page %s' , max( $paged, $page ) );
    ?>
    </title>

    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <link id="favicon" rel="icon"  type="image/png" href="<?php echo $pmc_data['favicon'] ?>">
    <link rel="alternate" type="application/atom+xml" title="<?php bloginfo('name'); ?> Atom Feed" href="<?php bloginfo('atom_url'); ?>" />

    <?php if ( is_singular() && get_option( 'thread_comments' ) ) {wp_enqueue_script( 'comment-reply' ); }?>

    <!-- add google analytics code -->
    <?php       
    if(isset($pmc_data['google_analytics'])) 
    echo pmc_stripText($pmc_data['google_analytics']); 
    ?>
    <?php wp_head();?>
</head>     
<!-- start body -->
<body <?php body_class(); ?>>
    <!-- start header -->
    <header>
        <div id="headerwrap" >
            <!-- fixed menu -->
            <div class="pagenav fixedmenu">
                <div class="holder-fixedmenu">
                    <div class="logo-fixedmenu">
                        <?php $logo = $pmc_data['logo']; ?>
                        <a href="<?php echo home_url(); ?>"><img src="<?php if ($logo != '') {?><?php echo $logo; ?><?php } else {?><?php get_template_directory_uri(); ?>/images/logo.png<?php }?>" alt="<?php bloginfo('name'); ?> - <?php bloginfo('description') ?>" ></a>
                    </div>
                    <div class="menu-fixedmenu">
                        <?php 
                        if ( has_nav_menu( 'scroll_menu' ) ) {
                             wp_nav_menu( array(
                             'container' =>false,
                             'container_class' => 'menu-scroll',
                             'theme_location' => 'scroll_menu',
                             'echo' => true,
                             'fallback_cb' => 'ideo_fallback_menu',
                             'before' => '',
                             'after' => '',
                             'link_before' => '',
                             'link_after' => '',
                             'depth' => 0,
                             'walker' => new description_walker())
                             ); 
                        }
                        ?>
                    </div>
                    <!-- respoonsive menu for scrool bar -->

                </div>
            </div>  
            <!-- top bar -->
            <div class="TopHolder">
                <?php pmc_showTop() ?>  
            </div>  
            <!-- logo and main menu -->
            <div id="header">   
                <div class = "header-inner">
                    <div class="header-social">
                        <?php pmc_socialLink() ?>
                    </div>
                    <div id="logo">
                        <?php $logo = $pmc_data['logo']; ?>
                        <a href="<?php echo home_url(); ?>"><img src="<?php if ($logo != '') {?><?php echo $logo; ?><?php } else {?><?php get_template_directory_uri(); ?>/images/logo.png<?php }?>" alt="<?php bloginfo('name'); ?> - <?php bloginfo('description') ?>" /></a>
                            <div id="contact">
                            <p>07939598489</p>      <p>laura@bristolbridalboutique.co.uk</p>
            </div>
                    </div>
                    <!-- respoonsive menu main-->
                    <div class="respMenu noscroll">
                        <div class="resp_menu_button"><i class="fa fa-list fa-2x"></i> Menu</div>
                        <?php 
                        if ( has_nav_menu( 'resp_menu' ) ) {
                            $menuParameters =  array(
                              'theme_location' => 'resp_menu', 
                              'walker'         => new Walker_Responsive_Menu(),
                              'echo'            => false,
                              'items_wrap'     => '<div class="event-type-selector-dropdown">%3$s</div>',
                            );
                            echo strip_tags(wp_nav_menu( $menuParameters ), '<a>,<br>,<div>,<i>' );
                        }?> 
                    </div>  

                <!-- main menu -->
                <div class="pagenav">
                    <?php 
                    if ( has_nav_menu( 'main-menu' ) ) {
                         wp_nav_menu( array(
                         'container' =>false,
                         'container_class' => 'menu-header',
                         'theme_location' => 'main-menu',
                         'echo' => true,
                         'fallback_cb' => 'ideo_fallback_menu',
                         'before' => '',
                         'after' => '',
                         'link_before' => '',
                         'link_after' => '',
                         'depth' => 0,
                         'walker' => new description_walker())
                         ); 
                    }
                    ?>

                </div>                  
            </div>  
        </div>          
    </header>           

1 个答案:

答案 0 :(得分:0)

要在右侧获取它,您可以使用

#contact{ float:right;}

并将其与其余部分对齐,您可以添加

margin-top:54px;

您可以添加的字体/颜色

font-family: "brioche-italic", georgia, "Helvetica Neue", Arial, Helvetica, Verdana, sans-serif !important;
font-size: 17px;
color: #94bfba !important;