✏️ 编辑:header-virgin.php
路径:
/home/forge/kingkrunch.com/wp/wp-content/themes/foodstuff/header-virgin.php
大小:11.1 KB · 修改:2020-09-11 16:13:49 · 权限:0775 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php /** * The Header for our theme * * Displays all of the <head> section and everything up till <div id="main"> * * @package WordPress * @subpackage Templatemela */ ?> <!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo( 'charset' ); ?>"> <meta name="viewport" content="width=device-width,user-scalable=no"> <link rel="profile" href="http://gmpg.org/xfn/11"/> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"/> <?php tm_header(); ?> <?php wp_head();?> </head> <body <?php body_class(); ?>> <?php if ( get_option('tm_control_panel') == 'yes' ) do_action('tm_show_panel'); ?> <div id="page" class="hfeed site"> <?php if ( get_header_image() ) : ?> <div id="site-header"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> <img src="<?php header_image(); ?>" width="<?php echo esc_attr(get_custom_header()->width); ?>" height="<?php echo esc_attr(get_custom_header()->height); ?>" alt="<?php echo esc_html_e('Siteheader','foodstuff'); ?>"> </a> </div> <?php endif; ?> <!-- Header --> <?php tm_header_before(); ?> <header id="masthead" class="site-header site-header-fix<?php echo " header".esc_attr(get_option('tm_header_layout')); ?> <?php echo esc_attr(tm_sidebar_position()); ?>"> <div class="header-fix"> <div class="topbar-outer"><!-- topbar-outer Start --> <div class="topbar-main theme-container"><!-- topbar-main Start --> <div class="topbar-left"><!-- topbar-left Start --> <?php $welcome_text = get_option('tm_topbar_welcome_text'); if(!empty($welcome_text)):?> <span class="site-welcome-message"><span><?php echo esc_attr(get_option('tm_topbar_welcome_text'))." ".get_bloginfo( 'name' ); ?></span></span> <?php endif; ?> </div><!-- topbar-left End --> <?php if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) : ?> <div class="topbar-right"><!-- topbar-right Start --> <div class="header_login"><!-- Start header cart --> <div class="header_logout"> <!-- Start header logout --> <?php $logout_url = " "; if ( is_user_logged_in() ) { $myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' ); if ( $myaccount_page_id ) { $logout_url = wp_logout_url( get_permalink( $myaccount_page_id ) ); if ( get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) $logout_url = str_replace( 'http:', 'https:', $logout_url ); } ?> <a href="<?php echo esc_url(get_permalink( get_option('woocommerce_myaccount_page_id')) ); ?>" title="<?php echo _e('My Account','foodstuff'); ?>" class="account"> <i class="blog-icon fa fa-user"></i><?php echo _e('My Account','foodstuff'); ?></a> <a href="<?php echo esc_url($logout_url); ?>" title="<?php echo _e('Logout','foodstuff'); ?>" class="logout" > <i class="blog-icon fa fa-power-off"></i><?php echo _e('Logout','foodstuff'); ?></a> <?php } else { ?> <a href="<?php echo esc_url( get_permalink( get_option('woocommerce_myaccount_page_id') ) ); ?>" title="<?php echo _e('Login/Register','foodstuff'); ?>" class="login show-login-link" id="show-login-link" > <i class="blog-icon fa fa-lock"></i> <?php echo _e('Login/Register','foodstuff'); ?></a> <?php } ?> </div> <!-- Start header End --> </div><!-- header cart End --> </div><!-- topbar-right End --> <?php endif; ?> </div><!-- topbar-main End --> </div><!-- topbar-outer End --> <div class="site-header-main"> <!-- Start site-header-main --> <div class="header-main"><!-- Start header-main --> <div class="theme-container"> <?php tm_header_inside(); ?> <?php if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) : ?> <div class="header-left"><!-- Start header-left --> <?php if (is_active_sidebar('header-search')) : ?> <!-- Woo commerce Header search Start --> <div class="header-search"> <div class="header-toggle"></div> <?php tm_get_widget('header-search'); ?> </div> <?php endif; ?> <!-- Woo commerce Header search --> </div> <!-- End header-left --> <?php endif; ?> <div class="header-center"><!-- Start header_center --> <!-- Header logo --> <div class="header-logo"><!-- Start header-logo --> <?php if (get_option('tm_logo_image') != '') : ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> <?php tm_get_logo(); ?> </a> <?php else: ?> <h1 class="site-title"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> <?php bloginfo( 'name' ); ?> </a> </h1> <?php endif; ?> <?php if(get_option('tm_showsite_description') == 'yes') : ?> <h2 class="site-description"> <?php bloginfo( 'description' ); ?> </h2> <?php endif; // End tm_showsite_description ?> </div> <!-- End header-logo --> <!-- Header Mob LOGO--> <div class="header-mob-logo"> <?php if (get_option('tm_mob_logo_image') != '') : ?> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"> <?php tm_get_mob_logo(); ?> </a> <?php else: ?> <h3 class="site-title"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> <?php bloginfo( 'name' ); ?> </a> </h3> <?php endif; ?> <?php if(get_option('tm_showsite_description') == 'yes') : ?> <h2 class="site-description"> <?php bloginfo( 'description' ); ?> </h2> <?php endif; // End tm_showsite_description ?> </div> </div><!-- End header-center --> <div class="header-right"><!-- Start header_right --> <?php if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) : ?> <!-- Woo commerce Header Cart Start --> <?php if ( is_active_sidebar( 'header-widget' ) ):?> <div class="header_cart headercart-block"> <div class="cart togg"> <?php global $woocommerce; ob_start();?> <div id="shopping_cart" class="shopping_cart tog" title="<?php esc_html_e('View your shopping cart', 'foodstuff'); ?>"> <a class="cart-contents" href="<?php echo esc_url($woocommerce->cart->get_cart_url()); ?>" title="<?php esc_html_e('View your shopping cart', 'foodstuff'); ?>"><?php echo sprintf(_n('%d items', '%d items', $woocommerce->cart->cart_contents_count, 'foodstuff'), $woocommerce->cart->cart_contents_count);?></a> </div> <?php global $woocommerce; ?> <?php tm_get_widget('header-widget'); ?> </div> </div> <?php endif; ?> <!-- Woo commerce Header Cart End --> <?php endif; ?> </div> <!-- End header_right --> </div> </div><!-- End header-main --> <div class="navigation-menu navigation-block"> <div id="navbar" class="navbar default navigation-inner"> <nav id="site-navigation" class="navigation main-navigation"> <h3 class="menu-toggle"><?php esc_html_e( 'Menu', 'foodstuff' ); ?></h3> <a class="screen-reader-text skip-link" href="#content" title="<?php esc_html_e( 'Skip to content', 'foodstuff' ); ?>"><?php esc_html_e( 'Skip to content', 'foodstuff' ); ?></a> <div class="mega-menu"> <?php wp_nav_menu( array( 'theme_location' => 'primary','menu_class' => 'mega' ) ); ?> </div> <div class="mobile-menu"> <span class="close-menu"></span> <?php wp_nav_menu( array( 'theme_location' => 'primary','menu_class' => 'mobile-menu-inner') ); ?> </div> </nav><!-- #site-navigation --> </div> </div><!-- navigation-menu End --> </div><!-- End site-header-main --> </div> </header> <!-- #masthead --> <?php tm_header_after(); ?> <?php tm_main_before(); ?> <!-- Center --> <?php $shop = '0'; if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) : if(is_shop()) $tm_page_layout = 'wide-page'; $shop = '1'; endif; ?> <div id="main" class="site-main <?php if (get_option('tm_show_topbar') == 'yes') echo "extra"; ?>"> <div class="main_inner"> <!-- Start main slider --> <?php if (is_page_template('page-templates/home.php') ) : ?> <div id="revolutionslider"> <div class="revolutionslider-inner"> <?php if ( in_array( 'revslider/revslider.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) : ?> <?php echo do_shortcode('[rev_slider '.get_option('tm_revslider_alias').']'); ?> <?php endif; ?> </div> </div> <?php endif; ?> <!-- End main slider --> <?php if ( !is_page_template('page-templates/home.php')) : ?> <div class="page-title header"> <div class="page-title-inner"> <h1 class="entry-title-main"> <?php if($shop == '1') { if(is_shop()) : echo ''; elseif(tm_is_blog()): esc_html_e( 'Blog', 'foodstuff' ); elseif(is_search()) : printf( esc_html__( 'Search Results for: "%s"', 'foodstuff' ), get_search_query() ); elseif( is_front_page() && is_home()): esc_html_e( 'Blog', 'foodstuff' ); elseif(is_singular('post')): esc_html_e( 'Blog Detail', 'foodstuff' ); else : the_title(); endif; }else { if(tm_is_blog()): esc_html_e( 'Blog', 'foodstuff' ); elseif(is_search()) : printf( esc_html__( 'Search Results for: "%s"', 'foodstuff' ), get_search_query() ); elseif(is_singular('post') ) : esc_html_e( 'Blog Detail', 'foodstuff' ); else : the_title(); endif; } ?> </h1> <?php if ( in_array( 'wordpress-seo/wp-seo.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) : tm_breadcrumbs(); endif; ?> </div> </div> <?php endif; ?> <?php $tm_page_layout = tm_page_layout(); if( isset( $tm_page_layout) && !empty( $tm_page_layout ) ): $tm_page_layout = $tm_page_layout; else: $tm_page_layout = ''; endif; if ( $tm_page_layout == 'wide-page' ) : ?> <div class="main-content-inner-full"> <?php else: if(is_archive() || is_tag() || is_404()) : ?> <div class="main-content"> <?php else : ?> <div class="main-content-inner <?php echo esc_attr(tm_sidebar_position()); ?>"> <?php endif; ?> <?php endif; ?> <?php tm_content_before(); ?>
💾 保存
取消
保存为 UTF-8,换行统一为 LF