Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- get_header();
- if(have_posts()):
- while(have_posts()):
- the_post();
- ?>
- <div class="under-contents">
- <div id="product_01" class="under-firstview" data-hash="product"><div class="inner"></div></div>
- <article class="block-box block-padding-bottom sep-block clearfix">
- <div class="container">
- <div class="product-obj-block">
- <h2 class="under-product-label">
- <span class="sub_title">タイトル1</span></h2>
- <div class="block-note tAc">
- <ul id="list_list" class="list1">
- <?php $args = array(
- 'nopaging' => true, // 'numberposts' => -1,
- 'post_type' => 'aaa',
- 'tax_query' => array( // タクソノミーのパラメータはこの形式
- array( // 配列の中に配列で書く
- 'taxonomy' => 'bbb',
- 'field' => 'slug', // 省略するとタームID
- 'terms' => 'xxx', // タームのスラッグ
- )
- ),
- );
- $customPosts = get_posts($args);
- if($customPosts) : foreach($customPosts as $post) : setup_postdata( $post );
- ?>
- <li>
- <?php $img = get_field('aaa_img');
- $imgurl = wp_get_attachment_image_src($img, 'large');
- if($imgurl){ ?>
- <a href="<? echo $imgurl[0]; ?>" class="bg_img" style="background: url(<? echo $imgurl[0]; ?>);" rel="shadowbox">
- <? } ?>
- <p class="product_p">タイトル1</p>
- <h3 class="product_title"><?php the_title(); ?></h3>
- <?php $txt = get_field('aaa_more');
- if($txt){ ?><p class="product_p"><? echo $txt; ?></p>
- <? } ?>
- </a>
- </li>
- <?php endforeach; ?>
- <?php endif; wp_reset_postdata(); ?>
- </ul>
- </div>
- <div class="sp-blank"></div>
- </div>
- </div>
- </article>
- <div id="product_02" class="under-firstview" data-hash="product"><div class="inner" style="background-attachment: scroll;"></div></div>
- <article class="block-box block-padding-bottom clearfix">
- <div class="container">
- <div class="product-obj-block">
- <h2 class="under-product-label">
- <span class="sub_title">タイトル2</span></h2>
- <div class="block-note tAc">
- <ul id="list_list" class="list2">
- <?php $args = array(
- 'nopaging' => true, // 'numberposts' => -1,
- 'post_type' => 'aaa',
- 'tax_query' => array( // タクソノミーのパラメータはこの形式
- array( // 配列の中に配列で書く
- 'taxonomy' => 'bbb',
- 'field' => 'slug', // 省略するとタームID
- 'terms' => 'yyy', // タームのスラッグ
- )
- ),
- );
- $customPosts = get_posts($args);
- if($customPosts) : foreach($customPosts as $post) : setup_postdata( $post );
- ?>
- <li>
- <?php $img = get_field('aaa_img');
- $imgurl = wp_get_attachment_image_src($img, 'large');
- if($imgurl){ ?>
- <a href="<? echo $imgurl[0]; ?>" class="bg_img" style="background: url(<? echo $imgurl[0]; ?>);" rel="shadowbox">
- <? } ?>
- <p class="product_p">タイトル2</p>
- <h3 class="product_title"><?php the_title(); ?></h3>
- <?php $txt = get_field('aaa_more');
- if($txt){ ?><p class="product_p"><? echo $txt; ?></p>
- <? } ?>
- </a>
- </li>
- <?php endforeach; ?>
- <?php endif; wp_reset_postdata(); ?>
- </ul>
- </div>
- <div class="sp-blank"></div>
- </div>
- </div>
- </article>
- <div id="product_03" class="under-firstview" data-hash="product"><div class="inner" style="background-attachment: scroll;"></div></div>
- <article class="block-box block-padding-bottom clearfix">
- <div class="container">
- <div class="product-obj-block">
- <h2 class="under-product-label">
- <span class="sub_title">タイトル3</span></h2>
- <div class="block-note tAc">
- <ul id="list_list" class="list3">
- <?php $args = array(
- 'nopaging' => true, // 'numberposts' => -1,
- 'post_type' => 'aaa',
- 'tax_query' => array( // タクソノミーのパラメータはこの形式
- array( // 配列の中に配列で書く
- 'taxonomy' => 'bbb',
- 'field' => 'slug', // 省略するとタームID
- 'terms' => 'zzz', // タームのスラッグ
- )
- ),
- );
- $customPosts = get_posts($args);
- if($customPosts) : foreach($customPosts as $post) : setup_postdata( $post );
- ?>
- <li>
- <?php $img = get_field('aaa_img');
- $imgurl = wp_get_attachment_image_src($img, 'large');
- if($imgurl){ ?>
- <a href="<? echo $imgurl[0]; ?>" class="bg_img" style="background: url(<? echo $imgurl[0]; ?>);" rel="shadowbox">
- <? } ?>
- <p class="product_p">タイトル3</p>
- <h3 class="product_title"><?php the_title(); ?></h3>
- <?php $txt = get_field('aaa_more');
- if($txt){ ?><p class="product_p"><? echo $txt; ?></p>
- <? } ?>
- </a>
- </li>
- <?php endforeach; ?>
- <?php endif; wp_reset_postdata(); ?>
- </ul>
- </div>
- <div class="sp-blank"></div>
- </div>
- </div>
- </article>
- </div>
- <?php
- endwhile;
- endif;
- get_footer();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement