Welcart Square 1.0.1 をリリースしました。
【変更点】
更新内容は以下のとおりです。
スマホ閲覧時、ヘッダーメニューの高さにばらつきがある不具合を修正
welcart_basic-square/js/wcct-menu.js 3行目
$( document ).ready( function() {
$( window ).load( function() {
トップページに表示する「商品」「インフォメーション記事」の表示件数が正しく反映されない不具合を修正
welcart_basic-nova/inc/front-customized.php 457~470行目
$itemcat = get_category_by_slug($h_itemcat);
$category__in[] = $itemcat->term_id;
$posts_per_page = $h_itemnum;
if( $info_disp ){
$infocat = get_category_by_slug($info_cat);
$category__in[] = $infocat->term_id;
$posts_per_page += $info_num;
}
$query->set( 'category__in', $category__in );
$query->set( 'posts_per_page', $posts_per_page );
$query->set( 'post__not_in', array() );
$posts_per_page = $h_itemnum;
//get informations
if( $info_disp ){
$infocat = get_category_by_slug($info_cat);
$info_posts_args = array(
'cat' => $infocat->term_id,
'posts_per_page' => $info_num,
'post_type' => 'post',
);
switch( $h_itemsort ){
case 1:
$info_posts_args['order'] = 'DESC';
$info_posts_args['orderby'] = 'date';
break;
case 2:
$info_posts_args['orderby'] = 'rand';
break;
default:
$info_posts_args['order'] = 'DESC';
$info_posts_args['orderby'] = 'ID';
break;
}
$info_posts = new WP_Query( $info_posts_args );
$include_info = array();
foreach( $info_posts->posts as $infopost ){
$include_info[] = $infopost->ID;
}
$posts_per_page += $info_num;
}
//get products
$itemcat = get_category_by_slug($h_itemcat);
$item_posts_args = array(
'cat' => $itemcat->term_id,
'posts_per_page' => $h_itemnum,
'post_type' => 'post',
);
switch( $h_itemsort ){
case 1:
$item_posts_args['order'] = 'DESC';
$item_posts_args['orderby'] = 'date';
break;
case 2:
$item_posts_args['orderby'] = 'rand';
break;
default:
$item_posts_args['order'] = 'DESC';
$item_posts_args['orderby'] = 'ID';
break;
}
$item_posts = new WP_Query( $item_posts_args );
foreach( $item_posts->posts as $itempost ){
$include_info[] = $itempost->ID;
}
//get total posts
$query->set( 'post__in', $include_info );
$query->set( 'posts_per_page', $posts_per_page );



