Guest User

Untitled

a guest
Apr 24th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. <?php
  2. $posts = get_posts('numberposts=100&category=557');
  3. global $post;
  4. ?>
  5. <?php if($posts): foreach($posts as $post): setup_postdata($post); ?>
  6.  
  7. <div style="padding:15px 0;border-bottom:1px dotted #dddddd;">
  8.  
  9. <strong>
  10. <?php the_field('team_name'); ?>『<?php the_field('title'); ?>』
  11. </strong>
  12. <br>
  13.  
  14. <span style="font-size:80%;">
  15. 【公演日程】<strong>
  16.  
  17. <?php $week = array("日", "月", "火", "水", "木", "金", "土"); ?>
  18.  
  19. <?php $date = date_create(''.get_field('schedule_start').''); echo date_format($date,'Y年m月d日') . "(" . $week[(int)date_format($date,'w')] . ")" ; ?>
  20.  
  21.  
  22. <?php $date = date_create(''.get_field('schedule_end').''); echo date_format($date,'Y年m月d日') . "(" . $week[(int)date_format($date,'w')] . ")" ; ?>
  23.  
  24. </strong>
  25.  <?php the_field('stages'); ?></span><br>
  26. <span style="font-size:80%;"><?php the_field('profile'); ?></span><br>
  27. <span style="font-size:80%;">【会場】<?php the_field('location'); ?></span><br>
  28.  
  29. <!--URlがあれば表示、の分岐 ここから-->
  30. <?php $imgid = get_field('url'); ?>
  31. <?php if(empty($imgid)):?>
  32. <?php else:?>
  33. <span style="font-size:80%;">【公演情報】<a href="<?php get_field('url')?>" target="_blank"><?php the_field('url'); ?></a></span><br>
  34. <?php endif;?>
  35. <!--URlがあれば表示、の分岐 ここまで-->
  36.  
  37. <!--見る見た表示 ここから-->
  38. <?php
  39. $cfcb = get_field_object('mirumita');
  40. $cfcbId = get_post_meta($post->ID,'mirumita');
  41. $cfcbId = $cfcbId[0];
  42. if($cfcb) {
  43. foreach($cfcbId as $v) {
  44. echo '<span style="font-size:60%;" class="ico-'. $v. '">' . $cfcb['choices'][$v] .'</span>';
  45. }
  46. }
  47. ?>
  48. <!--見る見た表示 ここまで-->
  49.  
  50. </div><!--data_box-->
  51.  
  52. <?php endforeach; endif;?>
  53.  
  54. <!--公演情報呼び出しここまで-->
  55.  
  56. $posts = get_posts('numberposts=100&category=557');
  57.  
  58. $posts = get_posts(
  59. array(
  60. 'numberposts' => 100,
  61. 'category' => 557,
  62. 'orderby' => 'meta_value',
  63. 'meta_key' => 'schedule_start',
  64. 'order' => 'ASC'
  65. )
  66. );
  67.  
  68. $posts = get_posts(
  69. array(
  70. 'numberposts' => 100,
  71. 'category' => 557,
  72. 'orderby' => 'meta_value',
  73. 'meta_key' => 'schedule_start',
  74. 'order' => 'ASC',
  75. 'meta_query' => array(
  76. 'key' => 'schedule_start',
  77. 'value' => array('2018/04/01', '2018/05/31'),
  78. 'compare' => 'BETWEEN',
  79. )
  80. )
  81. );
Add Comment
Please, Sign In to add comment