File: /virtual/nagasaki/public_html/shop/wp-content/themes/riffles_ver1.1/header.php
<?php
/**
* @package Riffles
* @link http://www.u-hg.com/
* @author RiffleHatch
* @copyright Copyright (c)2014 RiffleHatch
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php if( is_front_page() && !is_paged()): ?>
<meta property="og:locale" content="ja_JP" />
<meta property="og:site_name" content="<?php bloginfo( 'name' ); ?>" />
<meta property="og:type" content="website" />
<meta property="og:description" content="<?php bloginfo( 'description' ); ?>" />
<meta property="og:url" content="<?php echo esc_url( home_url( '/' ) ); ?>" />
<?php elseif(is_single() && in_category( 'item' )): ?>
<meta property="og:locale" content="ja_JP" />
<meta property="og:site_name" content="<?php bloginfo( 'name' ); ?>" />
<meta property="og:type" content="product" />
<meta property="og:title" content="<?php usces_the_itemName(); ?>" />
<meta property="og:description" content="<?php setup_postdata( $post ); echo mb_substr(strip_tags(get_the_content()), 0, 200); ?>" />
<meta property="og:url" content="<?php the_permalink(); ?>" />
<?php global $usces;
$post_id = $post->ID;
$code = get_post_meta($post_id, '_itemCode', true);
$pictid = (int)$usces->get_mainpictid($code);
$image_src = wp_get_attachment_image_src( $pictid,array(300,300) ); ?>
<meta property="og:image" content="<?php echo $image_src[0]; ?>" />
<?php elseif(! is_page(array('usces-member')) && is_singular() && ! in_category( 'item' )): ?>
<meta property="og:locale" content="ja_JP" />
<meta property="og:site_name" content="<?php bloginfo( 'name' ); ?>" />
<meta property="og:type" content="article" />
<meta property="og:title" content="<?php the_title(); ?>" />
<meta property="og:description" content="<?php setup_postdata( $post ); echo mb_substr(strip_tags(get_the_content()), 0, 200); ?>" />
<meta property="og:url" content="<?php the_permalink(); ?>" />
<meta property="og:image" content="<?php if( has_post_thumbnail()): ?><?php $image_id = get_post_thumbnail_id();
$image_url = wp_get_attachment_image_src($image_id, true);
echo $image_url[0];?><?php else: ?><?php echo catch_that_image(); ?><?php endif; ?>" />
<?php endif; ?>
<?php wp_head(); ?>
<!-- 修正<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/favicon/favicon.ico" type="image/vnd.microsoft.icon">-->
</head>
<body <?php body_class(); ?>>
<header id="header" class="site" role="banner">
<div class="row clear">
<div class="site-title col col-4 tablet-col-4 mobile-full">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<h1 class="text-center"><?php bloginfo( 'name' ); ?></h1>
<p class="text-center descriptionp"><?php bloginfo( 'description' ); ?></p>
</a>
</div>
<!--修正 ナビゲーション
<?php wp_nav_menu( array(
'container' => 'nav',
'container_class' => 'col col-5 tablet-col-5 topslid',
'container_id' => 'top-nav',
'menu_class' => 'inline-list',
'items_wrap' => '<h3 class="menetit no-desktop no-tablet show-mobile">Menu</h3><ul>%3$s<li class="liclose no-desktop no-tablet show-mobile">×閉じる</li></ul>',
'theme_location' => 'primary'
)); ?>
修正-->
<!-- #site-navigation -->
<!-- バッジ-->
<div class="cart col col-3 tablet-col-3 no-mobile">
<?php if(function_exists('usces_the_item')): ?>
<p class="welcome show-desktop show-tablet"><strong><?php if(usces_is_login()){printf(__('Mr/Mrs %s', 'usces'), usces_the_member_name('return'));}else{echo 'ゲスト様';} ?></strong></p>
<a href="<?php echo USCES_CART_URL; ?>" title="<?php _e('Shopping Cart','riffles'); ?>">
<i class="fa fa-shopping-cart"></i>
<span class="item_pri">¥<?php echo usces_total_price('return'); ?></span>
</a>
<?php usces_loginout_btn(); ?>
<?php else: ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><i class="fa fa-home"></i></a>
<?php endif; ?>
</div>
<!-- バッジ-->
<?php if ( function_exists('usces_the_item') ) : ?>
<nav id="mobile-nav" class="nav-button no-desktop no-tablet show-mobile">
<ul>
<li><a href="<?php echo home_url(); ?>"><i class="fa fa-home"></i><br><span>HOME</span></a></li>
<li><a id="topnavs" href="#header"><i class="fa fa-list"></i><br><span>MENU</span></a></li>
<?php if ( has_nav_menu( 'itemcat' ) ) : ?>
<li><a id="itemnavs" href="#header"><i class="fa fa-briefcase"></i><br><span>ITEM</span></a></li>
<?php endif; ?>
<?php if(function_exists('usces_the_item')): ?>
<li><a href="<?php echo USCES_CART_URL; ?>" title="<?php _e('Shopping Cart','riffles'); ?>"><i class="fa fa-shopping-cart"></i><br><span>¥<?php echo usces_total_price('return'); ?></span></a></li>
<li><?php usces_loginout_btn(); ?></li>
<?php endif; ?>
</ul>
</nav>
<?php else: ?>
<dl id="mobile-nav" class="nav-button typno no-desktop no-tablet show-mobile">
<dt id="topnavs" class="left"><i class="fa fa-list fa-fw"></i>MENU</dt>
<?php if ( has_nav_menu( 'itemcat' ) ) : ?>
<dt id="itemnavs" class="right">ITEM<i class="fa fa-list fa-fw"></i></dt>
<?php endif; ?>
</dl>
<?php endif; ?>
</div><!-- row -->
<?php if ( has_nav_menu( 'itemcat' ) ) : ?>
<?php wp_nav_menu( array(
'container' => 'nav',
'container_class' => 'relative topslid',
'container_id' => 'item-nav',
'menu_class' => '',
'items_wrap' => '<h3 class="menetit no-desktop no-tablet show-mobile">Item</h3><ul>%3$s<li class="liclose2 no-desktop no-tablet show-mobile">×閉じる</li></ul>',
'theme_location' => 'itemcat',
)); ?>
<!-- #site-navigation -->
<?php endif; ?>
</header><!-- #masthead -->
<div id="content-area">
<?php if( !is_front_page()): ?>
<?php get_template_part('breadcrumbs'); ?>
<?php endif; ?>