参考買取価格一覧
‘parent’ => $id
);
$terms = get_terms(‘item_group1’, $args);
if( $terms ):
echo ‘
- ‘;
- ‘.$term->name.’
foreach ( $terms as $term ) {
echo ‘
‘;
}
echo ‘
‘;
endif;
?>
- ‘ . “\n”;
- ‘ .$item_thumb. ‘‘ .$g1_name. ‘‘ .get_the_title(). ‘参考買取価格
‘ .$item_price_f. ‘
while ( have_posts() ) :
the_post();
// 品目
$tax1 = ‘item_group1’;
$g1_terms = get_the_terms($post -> ID, $tax1);
if( is_wp_error( $g1_terms ) || empty($g1_terms) ):
$g1_slug = “”;
$g1_name = “”;
else:
$aMax1 = 0;
foreach($g1_terms as $val1){
$depth = count(get_ancestors($val1->term_id, $tax1));
if($depth >= $aMax1){
$aMax1 = $depth;
$g1_current = $val1;
}
}
$g1_slug = $g1_current-> slug;
$g1_name = $g1_current-> name;
endif;
// サムネイル生成
if( has_post_thumbnail() ):
$item_thumb = ‘‘ .get_the_post_thumbnail( get_the_ID(), ‘medium’ ). ‘‘;
else:
$item_thumb = ‘‘;
endif;
// フィールド情報
$item_price = get_field(‘item_price’);
$item_price_f = “”;
if( !empty($item_price) ):
$item_price_f = ‘‘ .number_format( $item_price , 0 ). ‘円’;
endif;
echo ‘
‘ . “\n”;
endwhile;
echo ‘
‘ . “\n”;
the_posts_pagination(
array(
‘prev_text’ => twentyseventeen_get_svg( array( ‘icon’ => ‘arrow-left’ ) ) . ‘‘ . __( ‘Previous page’, ‘twentyseventeen’ ) . ‘‘,
‘next_text’ => ‘‘ . __( ‘Next page’, ‘twentyseventeen’ ) . ‘‘ . twentyseventeen_get_svg( array( ‘icon’ => ‘arrow-right’ ) ),
‘before_page_number’ => ‘ ‘,
)
);
else :
get_template_part( ‘template-parts/post/content’, ‘none’ );
endif;
wp_reset_query();
?>