welcartで会員ページのテーブル レスポンシブ

//カート

//usccart_navi 
div.usccart_navi ol.ucart {
	list-style: none;
	//overflow: hidden; 
	height: auto;
}
div.usccart_navi li.ucart {
	display: block;
	color: #262626;
	font-size: 14px;
	font-weight: bold;
	padding: 0 .909095em 0 1.81818em;
	background: #dedede;
	float: left;
	text-decoration: none;
	text-align: center;
	line-height: 40px;
}
div.usccart_navi li.ucart:before {
	display: block;
	width: 20px;
	height: 20px;
	margin: 0 -20px -20px auto;
	float: right;
	content: " ";
	-webkit-transform: skew(20deg);
	background: #dedede;
	border-right: 4px solid #fff;
	-moz-transform: skew(20deg);
	-o-transform: skew(20deg);
	transform: skew(20deg);
}
div.usccart_navi li.ucart:after {
	display: block;
	width: 20px;
	height: 20px;
	margin: -20px -20px 0 auto;
	background: #dedede;
	border-right: 4px solid #fff;
	position: relative;
	content: " ";
	-webkit-transform: skew(-20deg);
	-moz-transform: skew(-20deg);
	-o-transform: skew(-20deg);
	transform: skew(-20deg);	
}
div.usccart_navi li.ucart:last-child:before,
div.usccart_navi li.ucart:last-child:after {
	border: none;
}

body div.usccart_navi li.usccart_confirm,
body div.usccart_navi li.usccart_confirm:before,
body div.usccart_navi li.usccart_confirm:after,

body div.usccart_navi li.usccart_customer,
body div.usccart_navi li.usccart_customer:before,
body div.usccart_navi li.usccart_customer:after,

body div.usccart_navi li.usccart_cart,
body div.usccart_navi li.usccart_cart:before,
body div.usccart_navi li.usccart_cart:after,

body div.usccart_navi li.usccart_delivery,
body div.usccart_navi li.usccart_delivery:before,
body div.usccart_navi li.usccart_delivery:after
{

	color: #fff;
	background-color: #161616;
}

div.usccart_navi li.ucart.usccart_confirm, div.usccart_navi li.ucart.usccart_confirm:beforee, div.usccart_navi li.ucart.usccart_confirm:after {
    color: #fff;
	background-color: #161616;}


div.header_explanation{clear: both;}

//確認テーブル

#confirm_table td{font-size: 14px;padding: 12px;}
#confirm_table .ttl{background: @site_color_main}
#confirm_table h3{color: #fff;}


//会員情報
#memberinfo{
.retail{margin-bottom: 24px;}
	
	.order_head_value td{padding: 12px;}
	table .num{font-size: 100%}
	th{font-size: 90%}
	h3{ background: none;
	color: #333;
	font-size: 18px;
	height: auto;
	border: none;
	text-indent: inherit;
		padding-top: 24px; padding-bottom: 12px;
	}
	.customer_form input#zipcode{width: auto; }
	.customer_form input{width: auto; margin-left: 6px; margin-right: 6px;}
	select{font-size: 15px; margin-left: 6px; }
	
	.edit_member,.logout_member{display: none;}
	
	#memberdetail{margin-top: 60px;}
	
	.send input:nth-child(3){display: none}

}

@media screen and (max-width: 736px) {
//ナビ

	div.usccart_navi li.ucart{width:auto;font-size: 11px}
	.back_cart_button,.to_deliveryinfo_button,.back_to_delivery_button{margin-bottom: 12px;}
	
	#customer-info .customer_form input{width: 100%;}
	
	//カート1P目
	#inside-cart{#cart_table{.num,.thumbnail,.stock,.mov_none{display: none;}}}
	
	//カート4P目
	#info-confirm{#cart_table{.num,.thumbnail,.stock,.mov_none,.action{display: none;}}
	
	}
	
	
	#memberinfo{
		  width: 100%;
  table-layout: fixed;
  word-break: break-all;
  word-wrap: break-all;
		
		#memberdetail{ margin-top: auto;
			th,td{display: block} .blank_cell,.blank{display: none}}
		
		#history_head{th,td{display: block; padding: 12px;font-size: 12px;} 
			thead,tbody{ float: left;width: 50%;}
			tr{display: block;}
		
		}
		
		.retail{.cartrownum,.thumbnail{display: none;} margin-bottom: 60px;}
		
		.customer_form input{width: 100%;}
	}
	
	
	}
.customer_form input{width: 100%;}

これでなぜかテーブルがレスポンではみ出ない

welcart で ブログカードを使う方法

WordPressホーム/wp-includes/theme-compat/

embed-content.php
をテーマフィアルに

<?php
/**
 * Contains the post embed content template part
 *
 * When a post is embedded in an iframe, this file is used to create the content template part
 * output if the active theme does not include an embed-content.php template.
 *
 * @package WordPress
 * @subpackage Theme_Compat
 * @since 4.5.0
 */
?>
	<div <?php post_class( 'wp-embed' ); ?>>
		<?php
		$thumbnail_id = 0;

		if ( has_post_thumbnail() ) {
			$thumbnail_id = get_post_thumbnail_id();
		}

		if ( 'attachment' === get_post_type() && wp_attachment_is_image() ) {
			$thumbnail_id = get_the_ID();
		}

		/**
		 * Filters the thumbnail image ID for use in the embed template.
		 *
		 * @since 4.9.0
		 *
		 * @param int $thumbnail_id Attachment ID.
		 */
		$thumbnail_id = apply_filters( 'embed_thumbnail_id', $thumbnail_id );

		if ( $thumbnail_id ) {
			$aspect_ratio = 1;
			$measurements = array( 1, 1 );
			$image_size   = 'full'; // Fallback.

			$meta = wp_get_attachment_metadata( $thumbnail_id );
			if ( ! empty( $meta['sizes'] ) ) {
				foreach ( $meta['sizes'] as $size => $data ) {
					if ( $data['height'] > 0 && $data['width'] / $data['height'] > $aspect_ratio ) {
						$aspect_ratio = $data['width'] / $data['height'];
						$measurements = array( $data['width'], $data['height'] );
						$image_size   = $size;
					}
				}
			}

			/**
			 * Filters the thumbnail image size for use in the embed template.
			 *
			 * @since 4.4.0
			 * @since 4.5.0 Added `$thumbnail_id` parameter.
			 *
			 * @param string $image_size   Thumbnail image size.
			 * @param int    $thumbnail_id Attachment ID.
			 */
			$image_size = apply_filters( 'embed_thumbnail_image_size', $image_size, $thumbnail_id );

			$shape = $measurements[0] / $measurements[1] >= 1.75 ? 'rectangular' : 'square';

			/**
			 * Filters the thumbnail shape for use in the embed template.
			 *
			 * Rectangular images are shown above the title while square images
			 * are shown next to the content.
			 *
			 * @since 4.4.0
			 * @since 4.5.0 Added `$thumbnail_id` parameter.
			 *
			 * @param string $shape        Thumbnail image shape. Either 'rectangular' or 'square'.
			 * @param int    $thumbnail_id Attachment ID.
			 */
			$shape = apply_filters( 'embed_thumbnail_image_shape', $shape, $thumbnail_id );
		}

		if ( $thumbnail_id && 'rectangular' === $shape ) : ?>
			<div class="wp-embed-featured-image rectangular">
				<a href="<?php the_permalink(); ?>" target="_top">
					<?php echo wp_get_attachment_image( $thumbnail_id, $image_size ); ?>
				</a>
			</div>
		<?php endif; ?>

		<p class="wp-embed-heading">
			<a href="<?php the_permalink(); ?>" target="_top">
				<?php the_title(); ?>
			</a>
		</p>

		<?php if ( $thumbnail_id && 'square' === $shape ) : ?>
			<div class="wp-embed-featured-image square">
				<a href="<?php the_permalink(); ?>" target="_top">
					<?php echo wp_get_attachment_image( $thumbnail_id, //$image_size
					thumbnail
													  ); ?>
				</a>
			</div>
		<?php endif; ?>
		
 <?php if ( usces_is_item() ) : //welcartなら?> 	
	 <div class="wp-embed-featured-image square" style="margin-bottom: 0">
	 <a href="<?php the_permalink(); ?>" target="_top">
		 <?php
//商品画像
usces_the_itemImage(0, 300, 300); ?>
     </a>
      </div>
<?php endif; //welcartなら ?>
	
		<div class="wp-embed-excerpt"><?php the_excerpt_embed(); ?></div>

		<?php
		/**
		 * Prints additional content after the embed excerpt.
		 *
		 * @since 4.4.0
		 */
		do_action( 'embed_content' );
		?>

		<div class="wp-embed-footer" style="display: none">
			<?php// the_embed_site_title() ?>
			

			
			

			<div class="wp-embed-meta">
				<?php
				/**
				 * Prints additional meta content in the embed template.
				 *
				 * @since 4.4.0
				 */
				
				//do_action( 'embed_content_meta');
	
	
				?>
				

			</div>
		</div>
	</div>
<?php

		

とりあえずこうしたぞ

https://ywnb.net/p/201608/3097

レビュープレスは 星がでんかったでやめた。。

さらにカスタム

<?php
/**
 * Contains the post embed content template part
 *
 * When a post is embedded in an iframe, this file is used to create the content template part
 * output if the active theme does not include an embed-content.php template.
 *
 * @package WordPress
 * @subpackage Theme_Compat
 * @since 4.5.0
 */
?>
	<div <?php post_class( 'wp-embed' ); ?>>
		<?php
		$thumbnail_id = 0;

		if ( has_post_thumbnail() ) {
			$thumbnail_id = get_post_thumbnail_id();
		}

		if ( 'attachment' === get_post_type() && wp_attachment_is_image() ) {
			$thumbnail_id = get_the_ID();
		}

		/**
		 * Filters the thumbnail image ID for use in the embed template.
		 *
		 * @since 4.9.0
		 *
		 * @param int $thumbnail_id Attachment ID.
		 */
		$thumbnail_id = apply_filters( 'embed_thumbnail_id', $thumbnail_id );

		if ( $thumbnail_id ) {
			$aspect_ratio = 1;
			$measurements = array( 1, 1 );
			$image_size   = 'full'; // Fallback.

			$meta = wp_get_attachment_metadata( $thumbnail_id );
			if ( ! empty( $meta['sizes'] ) ) {
				foreach ( $meta['sizes'] as $size => $data ) {
					if ( $data['height'] > 0 && $data['width'] / $data['height'] > $aspect_ratio ) {
						$aspect_ratio = $data['width'] / $data['height'];
						$measurements = array( $data['width'], $data['height'] );
						$image_size   = $size;
					}
				}
			}

			/**
			 * Filters the thumbnail image size for use in the embed template.
			 *
			 * @since 4.4.0
			 * @since 4.5.0 Added `$thumbnail_id` parameter.
			 *
			 * @param string $image_size   Thumbnail image size.
			 * @param int    $thumbnail_id Attachment ID.
			 */
			$image_size = apply_filters( 'embed_thumbnail_image_size', $image_size, $thumbnail_id );

			$shape = $measurements[0] / $measurements[1] >= 1.75 ? 'rectangular' : 'square';

			/**
			 * Filters the thumbnail shape for use in the embed template.
			 *
			 * Rectangular images are shown above the title while square images
			 * are shown next to the content.
			 *
			 * @since 4.4.0
			 * @since 4.5.0 Added `$thumbnail_id` parameter.
			 *
			 * @param string $shape        Thumbnail image shape. Either 'rectangular' or 'square'.
			 * @param int    $thumbnail_id Attachment ID.
			 */
			$shape = apply_filters( 'embed_thumbnail_image_shape', $shape, $thumbnail_id );
		}
 if ( usces_is_item() ) : //welcartならなし
	else:
		if ( $thumbnail_id && 'rectangular' === $shape ) : ?>
			<div class="wp-embed-featured-image rectangular">
				<a href="<?php the_permalink(); ?>" target="_top">
					<?php echo wp_get_attachment_image( $thumbnail_id, $image_size ); ?>
				</a>
			</div>
		<?php endif; //welcartならなしおわり
		endif;?>

		<p class="wp-embed-heading">
			<a href="<?php the_permalink(); ?>" target="_top">
				<?php the_title(); ?>
			</a>
		</p>

		<?php if ( $thumbnail_id && 'square' === $shape ) : ?>
			<div class="wp-embed-featured-image square">
				<a href="<?php the_permalink(); ?>" target="_top">
					<?php echo wp_get_attachment_image( $thumbnail_id, //$image_size
					thumbnail
													  ); ?>
				</a>
			</div>
		<?php endif; ?>
		
 <?php if ( usces_is_item() ) : //welcartなら?> 	
	 <div class="wp-embed-featured-image square" style="margin-bottom: 0">
	 <a href="<?php the_permalink(); ?>" target="_top">
		 <?php
//商品画像
usces_the_itemImage(0, 300, 300); ?>
     </a>
      </div>
<?php endif; //welcartなら ?>
	
		<div class="wp-embed-excerpt"><?php 
			//the_excerpt();
			//the_excerpt_embed();
			
			    $description_emb = strip_tags($post->post_content);
      $description_emb = str_replace("\n", "", $description_emb);
      $description_emb = str_replace("\r", "", $description_emb);
	$description_emb = str_replace('"', '*', $description_emb);
      $description_emb = mb_substr($description_emb, 0, 120) . "...";
			
			echo $description_emb;
			
			?>
			<div style="text-align: right">
			<!-- クラス効かない class="link_color" -->
			<a style="color: #f15a24;"
			href="<?php the_permalink(); ?>">
			 <?php if ( usces_is_item() ) : //welcartなら?> 
			 この商品を見る▶︎
			 <?php else: ?>
			 全文を表示する▶︎
			 <?php endif; ?>
			 </a></div>
			</div>

		<?php
		/**
		 * Prints additional content after the embed excerpt.
		 *
		 * @since 4.4.0
		 */
		do_action( 'embed_content' );
		?>

		<div class="wp-embed-footer" style="display: none">
			<?php// the_embed_site_title() ?>
			

			
			

			<div class="wp-embed-meta">
				<?php
				/**
				 * Prints additional meta content in the embed template.
				 *
				 * @since 4.4.0
				 */
				
				//do_action( 'embed_content_meta');
	
	
				?>
				

			</div>
		</div>
	</div>
<?php

		

ReviewPress ループで効かない件 とその他改造

400行目くらいから class-shortcode.php

id raty_rich だからループでおかしくなってたので
クラスにかえ、更に、
記事IDを入れたクラスを付け そこに 星を入れる設定にした。

		$query = new WP_Query( $query_args );

		$total_rating = 0;
		if ( $query->have_posts() ) :
			while ( $query->have_posts() ) : $query->the_post();

			$total_rating += intval( get_post_meta( $post->ID ,'wpbr_review_rating',true ) );
			$parent_title = get_the_title( wp_get_post_parent_id( $post->ID ) );
		
		//tuiki 
		$d_id = $post->ID;

		endwhile;
	
		$rich_rating = "<div class='raty_rich raty_rich".$d_id."' style='color:". review_get_option( 'rating_icon_color', 'wpbr_display' ) ."'></div>";

		if ( 'star' === review_get_option( 'review_icon', 'wpbr_display' ) ) {
			$rich_rating .= "<script>
			jQuery('.raty_rich".$d_id."').raty({
				readOnly : true,
				cancel   : false,
				half     : true,
				score    : '".round( $total_rating / $query->post_count , 2 )."',
				starType : 'i',
				starHalf : 'wpbr-star-half',
				starOff  : 'wpbr-star-off',
				starOn   : 'wpbr-star-on',
			});
			</script>";
		} else {
			$rich_rating .= "<script>
			jQuery('.raty_rich').raty({
				readOnly : true,
				cancel   : false,
				half     : true,
				score    : '".round( $total_rating / $query->post_count , 2 )."',
				starType : 'i',
				starHalf : 'wpbr-heart-half',
				starOff  : 'wpbr-heart-off',
				starOn   : 'wpbr-heart-on',
			});
			</script>";
		}

		ob_start();
		
		?>


<!--シングル-->
	
	<?php if(is_single()):?>		
		<div itemscope itemtype="http://schema.org/Product" class="d_rate">
			<span itemprop="name" style="display:none"><?php echo esc_html( $parent_title ); ?></span>
			<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" >
				<div class="d_rate2">5つ星のうち<span itemprop="ratingValue"><?php echo esc_html( round( $total_rating / $query->post_count , 2 ) ); ?></span> </div>
<!--				based on-->
				<div class="link_color d_rate3" style="cursor: pointer"> <span itemprop="reviewCount"><?php echo esc_html( $query->post_count ); ?></span>件のレビュー</div>
				<div style="display:none">
					<span itemprop="bestRating">5</span>
					<span itemprop="worstRating">1</span>
				</div>
			</div>
		</div>
		
	<?php else:?>		
<!--ループ-->
				<div itemscope itemtype="http://schema.org/Product" class="d_rate" style="margin-left: -12px;">
			<span itemprop="name" style="display:none"><?php echo esc_html( $parent_title ); ?></span>
			<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" >
				<div class="d_rate2">5つ星のうち<span itemprop="ratingValue"><?php echo esc_html( round( $total_rating / $query->post_count , 2 ) ); ?></span> </div>
<!--				based on-->
				<div class=" d_rate3">(<span itemprop="reviewCount"><?php echo esc_html( $query->post_count ); ?></span>件)</div>
				<div style="display:none">
					<span itemprop="bestRating">5</span>
					<span itemprop="worstRating">1</span>
				</div>
			</div>
		</div>
		
		<?php endif;?>

		<?php
		$rich_rating .= ob_get_clean();

		return $rich_rating;

	endif;
	wp_reset_postdata();

ベストセラー スティング

//welcartベストセラー サムネイル+順位表示が画像
add_filter('usces_filter_bestseller', 'my_bestseller_func', 10, 3);
function my_bestseller_func() {
    $args = func_get_args();
    list($html, $post_id, $index) = $args;
    $post = get_post($post_id);
    if ( $index == 0 ){
    $img = '/wp-content/themes/D/d/img/rank/1.png';
}    elseif ( $index == 1 ){
    $img = '/wp-content/themes/D/d/img/rank/2.png';
}    elseif ($index == 2){
    $img = '/wp-content/themes/D/d/img/rank/3.png';
}    else {
}
 $index = $index + 1;
	//usces_have_skus();
	global $usces;//計算始め
	$price = usces_the_firstPrice( 'return',$post );//売価
	$tax = $usces->getTax( $price );//売価×基本設定の税額(税計算方法も考慮します)
	$dprice = number_format($price + $tax);	
	$did = $post_id;
	$did2 = '[REVIEWPRESS_RICH_SNIPPET id="'.$did.'"]';
	$did3 = do_shortcode($did2);
	
    $list = '<a href="' . get_permalink($post_id) . '" class="top_new_item_box"><img src="' . $img . '" width="24" style="padding-bottom:6px; padding-right:6px;" /><span class="rank_num">'.$index.'.</span><div class="top_new_item_sam">
' . usces_the_itemImage(0, 300, 300, $post, 'return' ) . '</div><div class="top_item_name">' . $post->post_title . '</div>
      <div class="top_item_disp">¥'.$dprice.'</span><em class="tax">(税込)</em>
	  
	  		  <div>
	'.$did3.'
</div>
		 
</div>




</a>
';
	
    return $list;
}

youtube 自動でdivで囲う ファンクション

WordPressの投稿にURLだけでYouTube動画を埋め込む際のHTMLをカスタマイズする方法

// Customize YouTube oEmbed Code
function custom_youtube_oembed($code){
  if(strpos($code, 'youtu.be') !== false || strpos($code, 'youtube.com') !== false){
    $html = preg_replace('/ width="\d+"/', '', $html);
    $html = preg_replace('/ height="\d+"/', '', $html);
    $html = '<div class="youtube">' . $html . '</div>';

    return $html;
  }
  return $code;
}

add_filter('embed_handler_html', 'custom_youtube_oembed');
add_filter('embed_oembed_html', 'custom_youtube_oembed');

実際は分岐した
admin-siteファンク

// Customize YouTube oEmbed Code youtube 自動でdivで囲う
function custom_youtube_oembed($code){
  if(strpos($code, 'youtu.be') !== false || strpos($code, 'youtube.com') !== false && is_singular('post')){
    $html = preg_replace("@src=(['\"])?([^'\">\s]*)@", "src=$1$2", $code);
    $html = preg_replace('/ width="\d+"/', '', $html);
    $html = preg_replace('/ height="\d+"/', '', $html);
    $html = '<div class="youtube">' . $html . '</div>';

    return $html;
  }
  return $code;
}

add_filter('embed_handler_html', 'custom_youtube_oembed');
add_filter('embed_oembed_html', 'custom_youtube_oembed');

カテゴリ ターム 一括登録は

WP Taxonomy Import が河島で成功したやつ

Simple Taxonomyが ツールに入ってるやつ

 

WP Taxonomy Import 設定から

愛知県
愛知県->春日井市
愛知県->尾張旭市
愛知県->瀬戸市
愛知県->一宮市
愛知県->小牧市
愛知県->愛西市
愛知県->あま市
愛知県->稲沢市
愛知県->犬山市
愛知県->岩倉市
愛知県->大府市
愛知県->北名古屋市
愛知県->清須市
愛知県->江南市
愛知県->知多市
愛知県->津島市
愛知県->東海市
愛知県->常滑市
愛知県->豊明市
愛知県->長久手市
愛知県->日進市
愛知県->半田市
愛知県->弥富市

愛知県->名古屋市
愛知県->名古屋市->名古屋市名東区
愛知県->名古屋市->名古屋市守山区
愛知県->名古屋市->名古屋市東区
愛知県->名古屋市->名古屋市北区
愛知県->名古屋市->名古屋市千種区
愛知県->名古屋市->名古屋市西区
愛知県->名古屋市->名古屋市中村区
愛知県->名古屋市->名古屋市中区
愛知県->名古屋市->名古屋市昭和区
愛知県->名古屋市->名古屋市瑞穂区
愛知県->名古屋市->名古屋市熱田区
愛知県->名古屋市->名古屋市中川区
愛知県->名古屋市->名古屋市南区
愛知県->名古屋市->名古屋市港区
愛知県->名古屋市->名古屋市緑区
愛知県->名古屋市->名古屋市天白区

愛知県->愛知郡東郷町

愛知県->海部郡大治町
愛知県->海部郡蟹江町
愛知県->海部郡飛鳥村

愛知県->西春日井郡豊山町

愛知県->丹羽郡大口町
愛知県->丹羽郡扶桑町

愛知県->知多郡阿久比町
愛知県->知多郡武豊町
愛知県->知多郡東浦町
愛知県->知多郡南知多町
愛知県->知多郡美浜町


愛知県->岡崎市
愛知県->豊田市
愛知県->安城市
愛知県->刈谷市
愛知県->高浜市
愛知県->知立市
愛知県->西尾市
愛知県->碧南市
愛知県->みよし市
愛知県->額田郡幸田町

愛知県->豊橋市
愛知県->豊川市
愛知県->蒲郡市
愛知県->田原市
愛知県->新城市

愛知県->北設楽郡設楽町
愛知県->北設楽郡東栄町
愛知県->北設楽郡豊根村

岐阜県
岐阜県->多治見市

WP Taxonomy Import 設定から

北海道・東北

北海道・東北->北海道
北海道・東北->青森
北海道・東北->秋田
北海道・東北->岩手
北海道・東北->宮城
北海道・東北->山形
北海道・東北->福島

関東

関東->東京
関東->埼玉
関東->千葉
関東->神奈川
関東->群馬
関東->栃木
関東->茨城


中部
中部->長野
中部->新潟
中部->山梨
中部->愛知
中部->岐阜
中部->三重
中部->静岡


近畿
近畿->京都
近畿->大阪
近畿->兵庫
近畿->奈良
近畿->滋賀
近畿->和歌山


中国・四国
中国・四国->広島
中国・四国->岡山
中国・四国->島根
中国・四国->鳥取
中国・四国->山口
中国・四国->徳島
中国・四国->香川
中国・四国->愛媛
中国・四国->高知



九州・沖縄
九州・沖縄->福岡
九州・沖縄->佐賀
九州・沖縄->長崎
九州・沖縄->大分
九州・沖縄->熊本
九州・沖縄->宮崎
九州・沖縄->鹿児島
九州・沖縄->沖縄

welcart レビュー何件 スクロール表示

スクロール

ページ内を自在にスクロール | よく使うjQuery

$(function() {
 
    //ページ内スクロール
    $(".d_rate3").click(function () {
        var i = $(".btn_sample").index(this)
        var p = $("#go-review").eq(i).offset().top;
        $('html,body').animate({ scrollTop: p }, 'fast');
        return false;
    });
 
    //ページ上部へ戻る
//    $(".btn_top").click(function () {
//        $('html,body').animate({ scrollTop: 0 }, 'fast');
//        return false;
//    });
// 
//
});






<div class=&quot;blog_con&quot;>

<?php the_content(); ?>
	





<div id=&quot;go-review&quot;></div>






	
</div>






レビュープレス

WordPressで口コミ情報(ユーザーレビュー)を募集、掲載できるプラグイン「ReviewPress」

「include」を開き、さらに「class-shortcode.php」を開いて編集
448ぎょうめあたり

		
<!--シングル-->
	
	<?php if(is_single()):?>		
		





<div itemscope itemtype=&quot;http://schema.org/Product&quot; class=&quot;d_rate&quot;>

			<span itemprop=&quot;name&quot; style=&quot;display:none&quot;><?php echo esc_html( $parent_title ); ?></span>
			





<div itemprop=&quot;aggregateRating&quot; itemscope itemtype=&quot;http://schema.org/AggregateRating&quot; >

				





<div class=&quot;d_rate2&quot;>5つ星のうち<span itemprop=&quot;ratingValue&quot;><?php echo esc_html( round( $total_rating / $query->post_count , 2 ) ); ?></span> </div>






<!-- based on-->
				





<div class=&quot;link_color d_rate3&quot; style=&quot;cursor: pointer&quot;> <span itemprop=&quot;reviewCount&quot;><?php echo esc_html( $query->post_count ); ?></span>件のレビュー</div>






				





<div style=&quot;display:none&quot;>
					<span itemprop=&quot;bestRating&quot;>5</span>
					<span itemprop=&quot;worstRating&quot;>1</span>
				</div>






			</div>






		</div>






		
	<?php else:?>		
<!--ループ-->
				





<div itemscope itemtype=&quot;http://schema.org/Product&quot; class=&quot;d_rate&quot; style=&quot;margin-left: -12px;&quot;>

			<span itemprop=&quot;name&quot; style=&quot;display:none&quot;><?php echo esc_html( $parent_title ); ?></span>
			





<div itemprop=&quot;aggregateRating&quot; itemscope itemtype=&quot;http://schema.org/AggregateRating&quot; >

				





<div class=&quot;d_rate2&quot;>5つ星のうち<span itemprop=&quot;ratingValue&quot;><?php echo esc_html( round( $total_rating / $query->post_count , 2 ) ); ?></span> </div>






<!-- based on-->
				





<div class=&quot; d_rate3&quot;>(<span itemprop=&quot;reviewCount&quot;><?php echo esc_html( $query->post_count ); ?></span>件)</div>






				





<div style=&quot;display:none&quot;>
					<span itemprop=&quot;bestRating&quot;>5</span>
					<span itemprop=&quot;worstRating&quot;>1</span>
				</div>






			</div>






		</div>






		
		<?php endif;?>

シングル星平均

<?php $did = get_the_ID(); echo do_shortcode( ' [REVIEWPRESS_RICH_SNIPPET id=&quot;'.$did.'&quot;] ' ); ?>
  <?php wp_reset_postdata();?>

レビューと 登録フォーム

2つ並べるとコメント記事のIDが入りおかしくなるから

wp_reset_postdata();

<?php $did = get_the_ID(); // echo $did; echo do_shortcode( ' [REVIEWPRESS_SHOW id=&quot;'.$did.'&quot;] ' ); ?>




<?php// comment_form(); ?>
<?php// comments_template('', false); ?>



<?php echo do_shortcode( ' [REVIEWPRESS_FORM] ' ); ?>

ループ

		  





<div>
		  <?php $did = get_the_ID(); echo do_shortcode( ' [REVIEWPRESS_RICH_SNIPPET id=&quot;'.$did.'&quot;] ' ); ?>
</div>






// ]]>

WELCART カート確認画面で 獲得ポイント表示

参考

print_r( $usces_entries['order'] );
//結果
Array
(
    [usedpoint] => 
    [total_items_price] => 1000
    [discount] => 0
    [shipping_charge] => 0
    [cod_fee] => 0
    [payment_name] => 代引き
    [delivery_method] => 0
    [delivery_date] => 指定できません
    [delivery_time] => 指定できません
    [total_full_price] => 1000
    [note] => 
    [tax] => 0
    [delidue_date] => 
    [cus_id] => 
    [total_price] => 1000
    [getpoint] => 100
)
<table cellspacing="0" id="point_table">
    <tr>
        <td class="c-point">付与されるポイント</td>
        <td><span class="point"><?php echo $usces_entries['order']['getpoint']; ?></span>pt</td>
    </tr>
</table>

これを直接confirm.phpに記載

142 </table>の下 ポイントを利用するの下

	<table cellspacing="0" id="point_table">
    <tr>
        <td class="c-point">今回獲得ポイント</td>
        <td><span class="point" style="color:red"> '. $usces_entries['order']['getpoint'] .'</span> pt</td>
    </tr>
</table>

welcart カートページでの税込み表示

www.welcart.com/documents/manual/cart
カートの構成
cart.php/カート
商品詳細画面から「カートへ入れる」のボタンが押されたときに最初に表示されるページです。
購入しようとしている商品の一覧が表示されます。
カートで購入する数量を変更することができます。
customer_info.php/お客様情報入力画面
メールアドレスなどのお客様情報を記入してもらう画面が表示されます。
サブナビに表示される「清算する」項目をクリックしてもこのページに移動します。
delivery_info.php/発送・支払い方法入力画面
発送先・支払方法を選択する画面が表示されます。
発送先をお客様情報で記入した場所と同じところに送るか、別の場所に送るかを選択することができます。
confirm.php/内容確認画面
今まで入力してきた購入商品・お客様情報・発送先・支払方法を最終的に確認します。
completion.php/買い物完了画面
内容確認画面で「上記内容で注文する」ボタンを押した後に表示される画面です。
error.php/エラー画面
カート内でなんらかのエラーが生じた場合に表示される画面です。

cart.php/カート

$cart_table_footer = '</tbody>

		
<tfoot>
		
<tr>
			
<th class="num">&nbsp;</th>

			
<th class="thumbnail">&nbsp;</th>

			
<th colspan="3" scope="row" class="aright">' . __('total items','usces') . usces_guid_tax('return') . '</th>

			
<th class="aright">' . usces_crform($this->get_total_price(), true, false, 'return') . '</th>

			
<th class="stock">&nbsp;</th>

			
<th class="action">&nbsp;</th>

		</tr>

';
	
	//税込み 追記	
	 $total_price = usces_total_price('return') - usces_order_discount('return');
    $tax = $this -> getTax( $total_price );
	
	$cart_table_footer .='
	
<tr>
        
<td colspan="5" class="aright">'.usces_tax_label(array(), 'return').'</td>

        
<td class="aright">'. usces_crform($tax, true, false,'return').'</td>

        
<td colspan="2">&nbsp;</td>

    </tr>

    
<tr>
        
<th colspan="5" class="aright">税込合計<em class="tax">(税込)</em></th>

        
<th class="aright">'.
		usces_crform(($total_price + $tax), true, false, 'return'). '</th>

        
<th colspan="2">&nbsp;</th>

    </tr>

';

		
	//ここまで 	
	$cart_table_footer .='	</tfoot>

	</table>

';

これを追加 へんこう

参考
welcustom.net/consumption-tax-cart-page/

<?php if ( 'exclude' == $this->options['tax_mode'] ): ?>
<?php $total_price = usces_total_price('return') - usces_order_discount('return'); $tax = $this -> getTax( $total_price );
?>
    
<tr>
        
<td colspan="5" class="aright"><?php _e('consumption tax', 'usces'); ?></td>

        
<td class="aright"><?php echo usces_crform($tax, true, false); ?></td>

        
<td colspan="2">&nbsp;</td>

    </tr>

    
<tr>
        
<th colspan="5" class="aright"><?php _e('total items','usces'); ?><em class="tax">(税込)</em></th>

        
<th class="aright"><?php echo usces_crform(($total_price + $tax), true, false); ?></th>

        
<th colspan="2">&nbsp;</th>

    </tr>

<?php endif; ?>

カテゴリーの子か孫かアーカイブで判断するコードcat_is_ancestor_of

is_categoryとin_categoryの違いや使い方、条件分岐、複数指定、子孫カテゴリがある場合などなど

<?php if (is_category(5) || cat_is_ancestor_of(5, $cat)) { ?>
skyまたはskyの子孫となるカテゴリ一覧ページで表示される部分
<?php } ?>

ただ プリゲットポストpre_get_posts
で使えない

海外のサイトで発見

https://wordpress.stackexchange.com/questions/46008/how-to-check-if-a-child-category-is-being-queried

function change_number_of_posts($query) {
    if ($query->is_category){
         $cat = get_queried_object();
         $cat_id = (int) $cat->term_id;

         if( $query->is_category('recipes') || $query->is_category('product-reviews')){
              $query->query_vars['posts_per_page'] = -1; 
         }elseif(cat_is_ancestor_of(6,$cat_id)){
              $query->query_vars['posts_per_page'] = -1; 
         }
    }

    return $query;
}

add_filter('pre_get_posts', 'change_number_of_posts'); 

だもんでwelcart用にこうなった

		//welcart用
 if ($query->is_category){
	 $cat = get_queried_object();
         $cat_id = (int) $cat->term_id;
	if (is_category(287) ||
		cat_is_ancestor_of(287, $cat_id) && $query->is_main_query() ) {
$query->set('posts_per_page', 12 );
$query->set('meta_key','release');		
$query->set('orderby', array('meta_value' => 'DESC', 'date' => 'DESC') );//ブログはmeta_key release を使わないから'date' => 'DESC'が適用
  }
 }
	

フォントアイコンをCSS コンテンツで出す方法

「Fontello」を使えばアイコンフォントが簡単に使える!アイコン選んでソースコピペするだけ!

アイコンフォントの具体的な使い方 – Fontello


https://www.plusdesign.co.jp/blog/?p=3158

li.”クラス名”:before {
font-family: 'fontello';
content: '表示するアイコンのUnicode';
}

表示するアイコンのUnicode
「demo.html」のページで、[show codes]
fontello-codes.css」を見る

0xe852

0x
は本来バックスラッシュでいれるようだ
マックでバックスラッシュは
\
オプション¥で入れれる

結果
.tagcloud a:before {

font-family:'fontello';
content: '\e856';
 padding-right: 4px;
}

ブロガー 移行

//コンテンツ内のブロガー画像へのリンクをとる正規表現
add_filter( 'the_content', 'attachment_image_link_remove_filter' );
    function attachment_image_link_remove_filter( $content ) { 
        $content = 
        preg_replace(
        array('{<a(.*?)(blogspot)[^>]*><img}', 
        '{ *" /></a>}'), 
        array('<img','" />'), 
        $content
    );
    return $content; 
}

https://qiita.com/katsukii/items/1c1550f064b4686c04d4
https://msdn.microsoft.com/ja-jp/library/cc392020.aspx
https://qiita.com/honeydaisuki/items/d2a38cef1b95fd347fa4

https://qiita.com/potetopote_/items/6bb809db8f93803991cc

カスタムフィールドサーチ car.cssの書き出し

/*----------------------カスタムフィールドサーチ------------------*/

.car_serch_page_under{
	padding: 10px;
	border: 1px solid #CCC;
	background-color: #f7f8f8;
}

.car_serch_title_under{
	background-color: #9fa0a0;
	padding: 5px;
}

/*.searchform-paramsをboxに変更*/

.searchform-box{
	overflow: hidden;
	padding:20px;
}

.searchform-param{
	overflow: hidden;
}


/*インプット項目
左寄せ*/
.searchform-input-wrapper{ text-align:left}

.searchform-input-wrapper{
	/* width: 100%;	width: auto;*/
	}


/*チックボックス*/
input[type='checkbox']{

}
.checkbox-wrapper{
	float: left;
	margin-right: 10px;
	
}




/*項目見出し*/
.searchform-label{
	/*float: none;*//*ラベルのフロート解除*/
	/*width:100%; *//*ラベルの幅*/
	font-size: 14px;
	font-weight:normal;


}
/*サブミット全体*/
.searchform-controls{
	text-align: center;
	margin-top: 30px;
	margin-bottom:20px;
}


.searchform-controls 
input[type='submit']{
	font-size: 24px;
	padding-right: 20px;
	padding-left: 20px;
	background-image: url(/wp-content/themes/D/d/img/car/serch.png);
	background-repeat: no-repeat;
	text-indent: -9999px;
	background-color: #999;
	width: 167px;
	background-position: center center;
	display: inline-block;
	height: 46px;
	}

/*テキストインプット*/

.searchform-input-wrapper input{
	font-size: 14px;
	
/*	width: 90%;*/
}



/*検索項目の各マージン*/
.DropDownField,.TextField,.CheckboxInput{
	margin-top: 20px;
	/*clear: left;
	float: left;*/
/*	width: 100%;*/
	font-size: 14px;	
}

/*----------------------nth-childで上から順に指定-----------------------*/


/*上限 下限 選択のため*/
.car_search2,.car_search3,.car_search4,.car_search5,.car_search6,.car_search7,.car_search10,.car_search11,.car_search12
{ float:left;}




.car_search8
{ padding-top:20px;
	clear:both;
}




/*ドロップダウン部分サイズ*/
.searchform-input-wrapper{ 

/*width:30%*/

}

.car_search2 .searchform-input-wrapper,.car_search3 .searchform-input-wrapper,
.car_search4 .searchform-input-wrapper,.car_search5 .searchform-input-wrapper,
.car_search6 .searchform-input-wrapper,.car_search7 .searchform-input-wrapper,
.car_search10 .searchform-input-wrapper,.car_search11 .searchform-input-wrapper,
.car_search12 .searchform-input-wrapper

{ width:100px;}

.car_search8 .searchform-input-wrapper,.car_search9 .searchform-input-wrapper{ width:234px;}

/*ラベルサイズ固定*/
.searchform-label{ width:223px;}

.car_search3 .searchform-label,.car_search5 .searchform-label,.car_search7 .searchform-label,
.car_search11 .searchform-label,.car_search12 .searchform-label
{ width:24px; margin-left:10px;}

/*詳細前あける*/

.car_search9{ margin-bottom:20px;}



/*サイドバーの検索 & cssリセット*/

.car_serch_page_side .searchform-box{ padding:10px;}

.car_serch_page_side .car_search{float:none; margin-top:14px;}
.car_serch_page_side .searchform-label{ width:100%; margin-left:0px;}

.car_serch_page_side .searchform-input-wrapper{ width:96%;}

.car_serch_page_side .car_search4 .searchform-input-wrapper,
.car_serch_page_side .car_search5 .searchform-input-wrapper
{ width:44%;}

.car_serch_page_side  .car_search5  .searchform-label{ width:0px; margin-left:0px;}

.car_serch_page_side  .searchform-controls{ text-align:left; margin-left:10px;}

.car_serch_page_side .searchform-controls 
input[type='submit']{
	font-size: 24px;
	padding-right: 20px;
	padding-left: 15px;
	background-image: url(/wp-content/themes/D/d/img/car/submit.png);
	background-repeat: no-repeat;
	text-indent: -9999px;
	background-color: #999;
	width: 100px;
	background-position: center center;
	display: inline-block;
	height: 46px;
	}
	
	
	.car_serch_page_side .searchform-controls{ margin-top:20px;}
	.car_side_menu select#cat{ width:100%; font-size:14px;}

中古 ファンクションからきりだし

//未使用目もこーど//タクソノミ選択とカスタムフィールドのラジオボタンをシンクロさせる
//http://yahss.net/wordpress/1302-synchronize-tax-with-customfield/
function my_print_footer_scripts() {
    global $post_type;
    if ($post_type == 'estate'): ?>
<script type="text/javascript">
    //<![CDATA[
    jQuery(function($){
 
        // タクソノミ選択チェックボックスをラジオボタンに
        $(".categorychecklist input[type=checkbox]").each(function(){
            $(this).attr("type","radio");
        });
 
        // タクソノミIDとタクソノミ名を配列に定義
        var tax_arr = new Array();
        tax_arr['#in-tax_estate-6'] = '売買物件';
        tax_arr['#in-tax_estate-7'] = '賃貸物件';
 
        // タクソノミクリック時の処理
        $("input[name^=tax_input]").live("click", function(){
            $("input[name^=tax_input]").each(function(){
                if ( $(this).is(':checked') == true ) {
                    taxid = $(this).val();
                    taxname = tax_arr['#in-tax_estate-'+taxid];
                    return false;
                }
            });
            $("#acf-field-sellrent-"+taxname).attr('checked', 'checked');
        });
 
        // カスタムフィールドのラジオボタンクリック時の処理
        $("[id^=acf-field-sellrent-]").live("click", function(){
            $("[id^=acf-field-sellrent-]").each(function(){
                if ( $(this).is(':checked') == true ) {
                    taxname = $(this).val();
                    return false;
                }
            });
            for (var key in tax_arr) {
                if ( tax_arr[key] == taxname ) taxid = key;
            }
            $(taxid).attr('checked', 'checked');
        });
 
    });
    //]]>
</script>
<?php
    endif;
}
add_action('admin_print_footer_scripts', 'my_print_footer_scripts', 21);

商品 車販売 ブログ と検索と結果のページを分ける方法

検索フォームと検索結果ページを複数設置する

ここ参考

まず車はポストタイプカー

<div class="search_box">
<form role="search" method="get" id="searchform" action="/" >
<input type="text" value="<?php the_search_query(); ?>" name="s" class="s" />
<input type="hidden" name="post_type" value="car">
<input type="submit" class="searchsubmit" value="" />
</form>
</div>
<?php //if(function_exists('wp_custom_fields_search')) wp_custom_fields_search(); ?>
</div>

welcartは商品カテゴリ内 ポストタイプポスト

       <div class="search_box">
<form role="search" method="get" id="searchform" action="/" >
<input type="text" value="<?php the_search_query(); ?>" name="s" class="s" />
<input type="hidden" name="post_type" value="post">
 <input type="hidden" name="cat" id="cat" value="287" />
<input type="submit" class="searchsubmit" value="" />
</form>
</div>
<?php //if(function_exists('wp_custom_fields_search')) wp_custom_fields_search(); ?>
</div>

//ブログは商品カテゴリ除外

 <div class="search_box">
<form role="search" method="get" id="searchform" action="/" >
<input type="text" value="<?php the_search_query(); ?>" name="s" class="s" />
<input type="hidden" name="post_type" value="post">
 <input type="hidden" name="cat" id="cat" value="-287" />
<input type="submit" class="searchsubmit" value="" />
</form>
</div>
<?php //if(function_exists('wp_custom_fields_search')) wp_custom_fields_search(); ?>
</div>

検索結果は
ポストタイプごとに分けれるらしい
earch-投稿タイプ名.php” というテンプレートが使えるようになります。

add_filter('template_include','custom_search_template');
function custom_search_template($template){
  if ( is_search() ){
    $post_types = get_query_var('post_type');
    foreach ( (array) $post_types as $post_type )
      $templates[] = "search-{$post_type}.php";
    $templates[] = 'search.php';
    $template = get_query_template('search',$templates);
  }
  return $template;
}

ブログ結果添付内で
商品ならで違うフォームにとばしてリターンさせてブログはわけれそう

但し、車のファンクションで
is serch でメインクエリかけてる部分があるので
それを入れてるとブログの検索結果が除外されてしまうので
そこは検証

// サーチ ページ数
    if ( $query->is_search() && $query->is_main_query() ) {
$query->set('posts_per_page', 12 );
 $query->set( 'meta_key', 'car_open' );
 $query->set( 'orderby', 'meta_value_num' );
 $query->set( 'order', 'ASC' ); //数値が低い順
  }

これが問題なようだ

// サーチ ページ数
    if ( $query->is_search() && $query->is_main_query() ) {
$sortset = (string)filter_input(INPUT_POST, 'post');
	if ($sortset == 'car' ){
$query->set('posts_per_page', 12 );
 $query->set( 'meta_key', 'car_open' );
 $query->set( 'orderby', 'meta_value_num' );
 $query->set( 'order', 'ASC' ); //数値が低い順
  }
		}

としてpostがカーのときのみこれが効く様にした。

どうやらINPUT_POSTでなく INPUT_GETなようだ

xhtmlからhtml5に変えた時のline-hightの仕様

div内にspanでフォントサイズ調整したものは
いままでline-hightがそのサイズのline-hightをもっていたが

html5に変えると
親のdivの持っているフォントサイズのline-hightをもつことになる。

そのため
divでくくってやるとよい

body 1.55 単位なしで指定

若干 メニューやリストの高さも違う?

後日調べた結果
http://gakublog.com/archives/667
まず

img {
  vertical-align: bottom;
}

メニューのリスト等のサイズが変わる問題
これはアイコンフォントにフォントサイズが指定してあるから、

いままではアイコンフォントがはみ出していても無視されたが
今回は無視されない?
アイコンフォントを disoplay インラインblock にしてやるとよい ではなく
フォントサイズを指定しないか 100%にしてやること

あと FBのボタンがずれるので

.fb_iframe_widget > span {
	vertical-align: baseline !important;
}

【CSS】Facebookの「いいねボタン」の位置がズレる時の対処法

ローカル MAMP SSL https 複数 独自ドメイン

https://qiita.com/maximum80/items/c8756f65662d009cc52d
ここの参考

MAMPでSSLを使えるようにする際の設定

ここを見る

/Applications/MAMP/conf/apacheに直製造した。
server.key
server.key.bak
server.crt
server.csr

cd /Applications/MAMP/conf/apache/keys ×

cd /Applications/MAMP/conf/apache/

1
openssl genrsa -des3 -out server.key 1024

	
openssl req -new -key server.key -out server.csr


Country Name (2 letter code) [AU]:JP
State or Province Name (full name) [Some-State]:Aichi
Locality Name (eg, city) []:Kasugai-shi
Organization Name (eg, company) [Internet Widgits Pty Ltd]:D-MarkingDesign
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:localhost
Email Address []:info@d-marking.jp



openssl x509 -in server.csr -days 55365 -req -signkey server.key > server.crt

MAMP/conf/apache/httpd.conf

# Secure (SSL/TLS) connections
#Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf
# Secure (SSL/TLS) connections
Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf

MAMP/conf/apache/extra/httpd-ssl.conf

<VirtualHost _default_:443>

#   General setup for the virtual host
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/Dropbox/my_server/"
ServerName www.example.com:443
ServerAdmin info@d-marking.jp
ErrorLog "/Applications/MAMP/Library/logs/error_log"
TransferLog "/Applications/MAMP/Library/logs/access_log"
・
・
・

MAMP/conf/apache/extra/httpd-vhosts.conf

NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
ServerAdmin info@d-marking.jp
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
    ServerName localhost
</VirtualHost>

<VirtualHost *:80>
ServerAdmin info@d-marking.jp
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
    ServerName www.example.com
</VirtualHost>

これでローカルとwww.example.comはhttpsでつながった

問題はここからハマった

その下に
80はすでに書いてあるとして

<VirtualHost *:443>

    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/Dropbox/my_server/client/kanrikoushin/mama-clean.com"
    ServerName mama-clean.com:443
ServerAdmin info@d-marking.jp

SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "/Applications/MAMP/conf/apache/server.crt"
SSLCertificateKeyFile "/Applications/MAMP/conf/apache/server.key"
</VirtualHost>

<VirtualHost *:443>

    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/Dropbox/my_server/doggstar/temp/shop"
    ServerName www.shop.d-marking.jp:443
ServerAdmin info@d-marking.jp

SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "/Applications/MAMP/conf/apache/server.crt"
SSLCertificateKeyFile "/Applications/MAMP/conf/apache/server.key"
</VirtualHost>


<VirtualHost *:443>
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/Dropbox/my_server/doggstar/temp/car"
    ServerName www.car.d-marking.jp:443
ServerAdmin info@d-marking.jp

SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile "/Applications/MAMP/conf/apache/server.crt"
SSLCertificateKeyFile "/Applications/MAMP/conf/apache/server.key"
</VirtualHost>

これはできた時のコピペだが

テキストエディットのせいか
一回ではNOT FOUND になってしまう。
その場合
もう一度動いている443を1個コピペして
動かしたい
443から必要項目をコピペして
MAMPを再起動したら動いた

つまりは 通常の80番のときとおなじようなよくわからない動かないって言うエラー

これでローカルでSSLで作業できる。

テキストエディタ miで開いてコピペしたら一発でできた

https://qiita.com/nao_ipub/items/e7adf6043e7f9189a738
ローカルで毎回この接続ではプライバシーが保護されませんが出るので
localhost.cerをドロップしてDLして
ダブルクリック

「自己署名ルート証明書」とかになってる場合は、キーチェーンアクセスの該当行をダブルクリックして情報を確認。「信頼」タブを開き、「この証明書を使用するとき」を「常に信頼」にします。
(追記:「SSL(Secure Sockets Layer)」の行だけを「常に信頼」で大丈夫です。他にもメールや諸々使ってる時は適宜変更します。)

Shop 追加手順 welcart

welcartを入れる

D/d_parts/welcart
をコピーして入れる

f4_int.less(中心less)
に
@import "../d_parts/welcart/welcart.less";
@import "../4_custom/welcart/welcart.less"; // welcart
追加



welcart_funcに
$welcart_cat= 287;
$welcart_cat_out= -287;
の商品カテゴリにのIDを記載

//除外したいカテゴリIDを入れる
    if ( ! in_array( $parent->term_id, array( 287,290 ) ) ) 
を変更

// テキストエディタにクイックタグボタンを追加
もここで変更する



シンプルカスタムフィールドで
商品詳細フィールドを作成
商品詳細
WYSIWYG
item_info
投稿




ブログトップ
記事すべて読む
part_blog_top.php

に商品を表示させないコードを追加



//ブログトップ
<?php query_posts('post_type=post&cat='.$info_cat_out.','.$welcart_cat_out .'&paged='.$paged); 
 
//記事すべて読む
<?php query_posts('post_type=post&posts_per_page=12&cat='.$info_cat_out.','.$welcart_cat_out .'&paged='.$paged); 

//part_blog_top.php
  <?php
	  $args = array(
		'posts_per_page' => 6,
		'post_type' => 'post', //カスタム投稿名
		 'cat' => $info_cat_out.','.$welcart_cat_out,
		  )
		  ?>


ブログサイドバーにカテゴリを使うなら
blog_side_menu.phpに
'exclude_tree' => $welcart_cat_out,//welcartの商品ID
を追加


アーカーイブに
<?php  //--------------------------------商品アーカイブなら
if( in_category( 'item' ) || 
//親カテゴリスラッグで分岐 ファンクションコード使用
 post_is_in_descendant_category( get_term_by( 'slug', 'item', 'category' ))): 
 ?>
<?php include(get_stylesheet_directory() . "/d_parts/welcart/welcart-archive.php"); ?>
 <? return; endif;?>

を入れてリターンさせる



カスタムアドミンでいらないものを隠す
使いやすくする
custom-admin-css.css


/*welcart 商品詳細入力の横タイトル消す*/

.smart-cf-meta-box th{display: none;}


/*商品詳細本文欄*/
.welcart-shop_page_usces_itemedit #wp-content-wrap
,.welcart-shop_page_usces_itemedit #postdivrich

/*商品詳細本文文字 これで効く不明*/
,div.inside div.itempagetitle:nth-of-type(3)

/*商品オプション*/
,#itemoption
,.welcart-shop_page_usces_itemedit #cftdiv
,.welcart-shop_page_usces_itemedit #cfs_input_991

,.welcart-shop_page_usces_itemedit #tagsdiv-post_tag
,.welcart-shop_page_usces_itemedit #postimagediv
,.welcart-shop_page_usces_itemedit #commentsdiv
,.welcart-shop_page_usces_itemedit #yarpp_relatedposts

{display: none;}


 /*SKU追加ボタンを忘れがちだから赤化*/
 #newskusubmit input{ background: #e14d43;
border-color: #d02c21;
color: #fff;
-webkit-box-shadow: inset 0 1px 0 #ec8b85,0 1px 0 rgba(0,0,0,.15);
box-shadow: inset 0 1px 0 #ec8b85,0 1px 0 rgba(0,0,0,.15);
margin-bottom:15px;}

/*編集画面がちいさいから スマート*/
#smart_custom_fields_item_info__0__ifr{min-height: 600px;}







エディター画面にテーブルcssを対応させる
editor-style.css
/*welcart*/
.size_table th{background: #ececec;text-align: center;} 
.size_table td{text-align: center;}
.size_table th,.size_table td{padding: 10px;}


xserverの管理画面でssl対応する

アップしたワードプレスの設定をhttpsに変更

htaccessに
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

を追加

ラインウィジェットのアイコン画像のurlをhttpsに

google jsを

http://から
//
にする。

コンテンツエディタで投稿したものは
http になっているので

すべてhttpsに変換するべし
プラグインありそう

OK







地域 まとめ

ファンク 地域
function cptui_register_my_taxes_service_chiiki() {

	/**
	 * Taxonomy: 周辺地域.
	 */

	$labels = array(
		"name" => __( '対応地域', '' ),
		"singular_name" => __( '対応地域', '' ),
	);

	$args = array(
		"label" => __( '対応地域', '' ),
		"labels" => $labels,
		"public" => true,
		"hierarchical" => true,
		"label" => "対応地域",
		"show_ui" => true,
		"show_in_menu" => true,
		"show_in_nav_menus" => true,
		"query_var" => true,
		"rewrite" => array( 'slug' => '対応地域', 'with_front' => true, ),
		"show_admin_column" => false,
		"show_in_rest" => false,
		"rest_base" => "",
		"show_in_quick_edit" => false,
	);
	register_taxonomy( "service_chiiki", array( "site","post" ), $args );
}

add_action( 'init', 'cptui_register_my_taxes_service_chiiki' );



サイドバーのリスト表示
css 親子だとliでおかしな表示になるのでliで表示さあせない
そのため a で表示

css
con
.service_chiiki{
	a{display: inline-block;}
	a:after{content:",\00A0";}

	overflow: hidden;

	//li{float: left;}
	//li a:after{content:",\00A0";}
}


親子無視リストなし
<div class="side_shop service_chiiki" style="margin-top:20px;">
★対応地域<br>

<?php 
    $args = array(
	'show_option_all'    => '',
	'orderby'            => 'name',
	'order'              => 'ASC',
	'style'              => 'none',
	'show_count'         => 0,
	'hide_empty'         => 0,
	'use_desc_for_title' => 1,
	'child_of'           => 0,
	'feed'               => '',
	'feed_type'          => '',
	'feed_image'         => '',
	'exclude'            => '',
	'exclude_tree'       => '',
	'include'            => '',
	'hierarchical'       => 1,
	'title_li'           => __( '' ),
	'show_option_none'   => __( '' ),
	'number'             => null,
	'echo'               => 0,
	'depth'              => 0,
	'current_category'   => 0,
	'pad_counts'         => 0,
	'taxonomy'           => 'service_chiiki',
	'walker'             => null
    );
   $list = wp_list_categories( $args ); 
$list = str_replace("<br />", "", $list);
	echo $list;
?>
<div style="clear:both"></div>
その他地域もお気軽にご相談下さい。
	</div>






ブログサイドバー用 分岐+ ドロップダウン

買取地域は 別にタクソノミー(ブログ買取地域はblog_chiiki として サービス地域と全く同じものを入れる )
WP Taxonomy Import 設定からインポートすると楽


//ブログサイドバー blog_side_menu.php

//ドロップダウン地域 blog_side_menu_chiiki.php

 


シングル追加 カテゴリに地域 roop.php
<div class="blog_deta"><ul><li><?php the_time('Y.m.d'); ?></li><li class="blogcate_icon"><?php the_category(', '); ?>
            <?php echo get_the_term_list( $post->ID, 'blog_chiiki', ', ', ', ', '' ); ?>
            </li></ul>





タクソノミーに追加
<?php elseif(is_tax('blog_chiiki')):?>

<?php include( get_stylesheet_directory() . '/archive.php'); ?>

<?php endif; ?>


アーカイブに追加 archive.php

<h2 class="h2_class">
BLOG <? if(is_tag()):?>タグ:<? elseif(is_tax('blog_chiiki')):?>古本出張買取実績:<? else:?> カテゴリ:<? endif;?><?php single_term_title(); ?>   
</h2>






カテゴリの説明と画像を取得してservice_chiiki にひょうじさせる
アドバンスカスタムフィールど使用  cat_img  画像ID
説明はそのままディスプリクション

さらにブログカテゴリーにその同じ名前の記事があればリンクを表示させる


<!--個-->
<h3 class="h3_class2" style="margin-bottom:30px;">趣味の本の出張買取 <span class="d_price"></span></h3>
    
<?php  
    $tarmname = '趣味の本 出張買取';
	$tarm_id = get_category_by_slug($tarmname)->term_id;//ここまでディスプ&画像
	
	$post_id = 'category_'.$tarm_id; 
	$catimg = get_field('cat_img',$post_id);
$img = wp_get_attachment_image_src($catimg, 'd_jirei_img');
?>
<div style="position:relative; float:left;">

<? if($catimg):?>
<img src="<?php echo $img[0]; ?>" width="320"  class="img_left img_waku" alt="<?php echo $tarmname; ?>|<?php echo $alt1; ?> ">
<?php else: ?>
<img src="<?php echo get_stylesheet_directory_uri(); ?>/d/img/page_sam2.jpg" width="320"  class="img_left img_waku" alt="キーワード|<?php echo $alt1; ?> ">

<?php endif; ?>
</div>
<p>

<?php 
	echo category_description($tarm_id); ?>
<br>

</p>

<?php //関連制作事例コード

$taxonomy_name = 'category';

$args = array(
'slug' => $tarmname
);

 $taxonomy_term = get_terms($taxonomy_name,$args);
 if(!is_wp_error( $taxonomy_term) && count( $taxonomy_term)):
 $url = get_term_link($tarmname, $taxonomy_name);
?>  

<div class="jirei_link">
<a href="<?php echo $url; ?>" class=" link_bottan"><?php echo $tarmname; ?>実績 ▶▶</a>
</div>

<?php
endif; //--------ここまで
?>
 
<div style="clear:both"></div>
<br>



さらに
サービス地域の最下段で 同じ地域のブログがあればブログ 出す

  
  
  <?php //------------ブログあれば出す
	$cat_name = single_term_title("", false);
	  $args = array(
		'posts_per_page' => 3,
		'post_type' => 'post', //カスタム投稿名
		 'cat' => $info_cat_out,
		  
		  'tax_query' => array(
			'relation' => 'AND',
			array(
				'taxonomy' => 'blog_chiiki',
				'field' => 'slug',
				'terms' => $cat_name,
//'operator'=>'NOT IN'
				),
),
		  
		  // 'category_name' => $cat_name, 
		  )
		  ?>
 <?php
$myposts = get_posts( $args );
	  
	  if( $myposts){ echo '
	  
	  
	  <br><br>
	<h2 class="h2_class">'. $cat_name .'出張買取実績</h2>
	
	
  <div class="flex_box" style="padding-top:24px;">
	  
	  ';}
	foreach ( $myposts as $post ) : setup_postdata( $post ); ?>
  
  
<?php include(get_stylesheet_directory() . "/d_roop/a_blog_box1.php"); ?>
 
<?php endforeach; 
	  
	  
	  	  if( $myposts){ echo '
	  
	  
  </div>
  
  <div class="tsuzuki_box">
    <a href="/blog_chiiki/'. $cat_name .'/" class="link_all link_bottan" style=" font-size:13px;">すべて見る ▶▶</a>
    </div>
	  
	  ';}
	  
	  
wp_reset_postdata();//------------ブログあれば出す ?>



Shop 制作時追加

シンプルカスタムで
コンテンツを追加

出力
https://ja.wordpress.org/support/topic/smart-custom-fields%E3%81%AEwysiwyg-%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E6%8A%95%E7%A8%BF%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6/

<?php
$cf_sample = SCF::get('aaa');
echo wp_kses_post($cf_sample);
?>

但しクイックタグが利用できないので

自作クイックタグを テキストの方で
表示させる
テーブル
追加する
プラグイン不要!WordPressのテキストエディタにタグ挿入クイックタグボタンを追加する方法
WordPressで脱プラグイン!AddQuicktagを使わないでコード挿入ボタンを増やす方法
カスタムアドミン /*welcart*/ .size_table th{background: #ececec;text-align: center;} .size_table td{text-align: center;} .size_table th,.size_table td{padding: 10px;} xserverの管理画面でssl対応する アップしたワードプレスの設定をhttpsに変更 htaccessに RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] を追加 ラインウィジェットのアイコン画像のurlをhttpsに google jsを http://から // にする。 コンテンツエディタで投稿したものは http になっているので すべてhttpsに変換するべし プラグインありそう OK