carousel_style
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
1 changed file
with
1 additions
and
176 deletions
| ... | @@ -30,49 +30,12 @@ if( $is_preview ) { | ... | @@ -30,49 +30,12 @@ if( $is_preview ) { |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | $carousel_style = get_field('carousel_style'); | 32 | $carousel_style = get_field('carousel_style'); |
| 33 | error_log($carousel_style ); | 33 | |
| 34 | 34 | ||
| 35 | ?> | 35 | ?> |
| 36 | <div id="<?php echo esc_attr($id); ?>" class="<?php echo esc_attr($className); ?> "> | 36 | <div id="<?php echo esc_attr($id); ?>" class="<?php echo esc_attr($className); ?> "> |
| 37 | <?php switch($carousel_style){ | 37 | <?php switch($carousel_style){ |
| 38 | case 'count-up-infographic': | ||
| 39 | ?> | ||
| 40 | <?php if( have_rows('count_up_infographic_items') ): ?> | ||
| 41 | <div class="count-info carousel-items <?php echo $size; ?>"><div class='swiper-wrapper'> | ||
| 42 | <?php while( the_repeater_field('count_up_infographic_items') ): | ||
| 43 | ?> | ||
| 44 | <div class="swiper-slide"> | ||
| 45 | |||
| 46 | <?php $count = get_sub_field('count');?> | ||
| 47 | |||
| 48 | <div class="count-up-infographic-block vertical"> | ||
| 49 | <div class='row'> | ||
| 50 | <div class='column col-3 infographic'> | ||
| 51 | <img src="<?= the_sub_field('infographic');?>" alt="infographic" /> | ||
| 52 | </div> | ||
| 53 | <div class='column col-9'> | ||
| 54 | <?php if(!empty($count)){ ?> | ||
| 55 | <div class='row'> | ||
| 56 | <span class="countup"><?= $count; ?></span> | ||
| 57 | </div> | ||
| 58 | <?php } ?> | ||
| 59 | <div class='row'> | ||
| 60 | <p><?= the_sub_field('text'); ?></p> | ||
| 61 | </div> | ||
| 62 | </div> | ||
| 63 | </div> | ||
| 64 | </div> | ||
| 65 | 38 | ||
| 66 | </div> | ||
| 67 | <?php endwhile; ?> | ||
| 68 | </div></div> | ||
| 69 | <div class="swiper-button-prev" data-id="<?= $id ?>"></div> | ||
| 70 | <div class="swiper-button-next" data-id="<?= $id ?>"></div> | ||
| 71 | |||
| 72 | <?php else: ?> | ||
| 73 | <p>Please add some slides.</p> | ||
| 74 | <?php endif; ?> | ||
| 75 | <?php break; | ||
| 76 | case 'testimonials': ?> | 39 | case 'testimonials': ?> |
| 77 | 40 | ||
| 78 | <?php if( have_rows('testimonials_items') ): ?> | 41 | <?php if( have_rows('testimonials_items') ): ?> |
| ... | @@ -107,144 +70,6 @@ error_log($carousel_style ); | ... | @@ -107,144 +70,6 @@ error_log($carousel_style ); |
| 107 | <?php endif; ?> | 70 | <?php endif; ?> |
| 108 | 71 | ||
| 109 | <?php break; | 72 | <?php break; |
| 110 | case 'story': ?> | ||
| 111 | |||
| 112 | <?php if( have_rows('story_items') ): ?> | ||
| 113 | <div class="stories carousel-items <?php echo $size; ?>"><div class='swiper-wrapper'> | ||
| 114 | <?php while( the_repeater_field('story_items') ): | ||
| 115 | |||
| 116 | if(get_sub_field('story_post')){ | ||
| 117 | $post = get_sub_field('story_post'); | ||
| 118 | $image = get_the_post_thumbnail_url($post->ID, 'full'); | ||
| 119 | $title = $post->post_title; | ||
| 120 | $excerpt = get_excerpt_by_id($post->ID, 25); | ||
| 121 | |||
| 122 | } | ||
| 123 | if( get_sub_field('image')){ | ||
| 124 | $image = get_sub_field('image'); | ||
| 125 | $image = $image['url']; | ||
| 126 | } | ||
| 127 | if( get_sub_field('title')){ | ||
| 128 | $title = get_sub_field('title'); | ||
| 129 | } | ||
| 130 | if( get_sub_field('excerpt')){ | ||
| 131 | $excerpt = get_sub_field('excerpt'); | ||
| 132 | } | ||
| 133 | ?> | ||
| 134 | |||
| 135 | <div class="swiper-slide"> | ||
| 136 | |||
| 137 | <div class="story"> | ||
| 138 | <a tabindex="-1" href="<?php echo get_permalink( $post->ID); ?>"> | ||
| 139 | <div class="row"> | ||
| 140 | <div class="col story-image" style=background-image:url(<?php echo $image;?>); ></div> | ||
| 141 | </div> | ||
| 142 | <div class="row"> | ||
| 143 | <div class="col story-content sameHeight"> | ||
| 144 | <div class="stories-text"><h3><?php echo $title; ?></h3><p><?php echo $excerpt; ?></p></div> | ||
| 145 | </div> | ||
| 146 | <div class="more-link">readmore</div> | ||
| 147 | </div> | ||
| 148 | </a> | ||
| 149 | </div> | ||
| 150 | |||
| 151 | </div> | ||
| 152 | <?php endwhile; ?> | ||
| 153 | </div></div> | ||
| 154 | <div class="swiper-button-prev" data-id="<?= $id ?>"></div> | ||
| 155 | <div class="swiper-button-next" data-id="<?= $id ?>"></div> | ||
| 156 | |||
| 157 | <?php else: ?> | ||
| 158 | <p>Please add some slides.</p> | ||
| 159 | <?php endif; ?> | ||
| 160 | <?php break; | ||
| 161 | case 'download': ?> | ||
| 162 | |||
| 163 | <?php if( have_rows('download_items') ): ?> | ||
| 164 | <div class="download carousel-items <?php echo $size; ?>"><div class='swiper-wrapper'> | ||
| 165 | <?php while( the_repeater_field('download_items') ): | ||
| 166 | ?> | ||
| 167 | <?php $file = get_sub_field('file'); ?> | ||
| 168 | <div class="swiper-slide"> | ||
| 169 | <div id="<?php echo esc_attr($id); ?>" class="download"> | ||
| 170 | <a tabindex="-1" href="<?php echo $file; ?>" download> | ||
| 171 | <?php $image = get_sub_field('image'); ?> | ||
| 172 | <div class="row"> | ||
| 173 | <div class="col download-image" style=background-image:url(<?php echo $image['url'];?>); ></div> | ||
| 174 | </div> | ||
| 175 | <div class="row"> | ||
| 176 | <div class="col download-bar"> | ||
| 177 | <div class="download-text"> | ||
| 178 | download | ||
| 179 | </div> | ||
| 180 | </div> | ||
| 181 | </div> | ||
| 182 | </a> | ||
| 183 | </div> | ||
| 184 | </div> | ||
| 185 | <?php endwhile; ?> | ||
| 186 | </div></div> | ||
| 187 | <div class="swiper-button-prev" data-id="<?= $id ?>"></div> | ||
| 188 | <div class="swiper-button-next" data-id="<?= $id ?>"></div> | ||
| 189 | <?php else: ?> | ||
| 190 | <p>Please add some slides.</p> | ||
| 191 | <?php endif; ?> | ||
| 192 | <?php break; | ||
| 193 | case 'staff-diaries': ?> | ||
| 194 | <?php if( have_rows('staff_diaries_items') ): ?> | ||
| 195 | <div class="staff carousel-items <?php echo $size; ?>"><div class='swiper-wrapper'> | ||
| 196 | <?php while( the_repeater_field('staff_diaries_items') ): | ||
| 197 | ?> | ||
| 198 | <?php $image = get_sub_field('image'); ?> | ||
| 199 | <div class="swiper-slide"> | ||
| 200 | <div class="staff-diaries"> | ||
| 201 | |||
| 202 | <div class="row"> | ||
| 203 | <div class="col staff-image" style=background-image:url(<?php echo $image['url'];?>); ></div> | ||
| 204 | </div> | ||
| 205 | <div class="row"> | ||
| 206 | <div class="col staff-content"> | ||
| 207 | <?php the_sub_field('text'); ?> | ||
| 208 | </div> | ||
| 209 | </div> | ||
| 210 | </div> | ||
| 211 | </div> | ||
| 212 | <?php endwhile; ?> | ||
| 213 | </div> </div> | ||
| 214 | <div class="swiper-button-prev" data-id="<?= $id ?>"></div> | ||
| 215 | <div class="swiper-button-next" data-id="<?= $id ?>"></div> | ||
| 216 | <?php else: ?> | ||
| 217 | <p>Please add some slides.</p> | ||
| 218 | <?php endif; ?> | ||
| 219 | <?php break; | ||
| 220 | case 'book-club': ?> | ||
| 221 | <?php if( have_rows('book_club_items') ): ?> | ||
| 222 | <div class="books carousel-items <?php echo $size; ?>"><div class='swiper-wrapper'> | ||
| 223 | <?php while( the_repeater_field('book_club_items') ): | ||
| 224 | ?> | ||
| 225 | <?php $image = get_sub_field('image'); ?> | ||
| 226 | <div class="swiper-slide"> | ||
| 227 | <div class="book-club"> | ||
| 228 | <a tabindex="-1" href=" <?php the_sub_field('divnk'); ?>" target="_blank"> | ||
| 229 | <div class="row"> | ||
| 230 | <div class="col book-image" style=background-image:url(<?php echo $image['url'];?>); ></div> | ||
| 231 | </div> | ||
| 232 | <div class="row"> | ||
| 233 | <div class="col book-content"> | ||
| 234 | <?php the_sub_field('text'); ?> | ||
| 235 | </div> | ||
| 236 | </div> | ||
| 237 | </a> | ||
| 238 | </div> | ||
| 239 | </div> | ||
| 240 | <?php endwhile; ?> | ||
| 241 | </div> </div> | ||
| 242 | <div class="swiper-button-prev" data-id="<?= $id ?>"></div> | ||
| 243 | <div class="swiper-button-next" data-id="<?= $id ?>"></div> | ||
| 244 | <?php else: ?> | ||
| 245 | <p>Please add some slides.</p> | ||
| 246 | <?php endif; ?> | ||
| 247 | <?php break; | ||
| 248 | default: ?> | 73 | default: ?> |
| 249 | <p>Please select style.</p> | 74 | <p>Please select style.</p> |
| 250 | <?php }; ?> | 75 | <?php }; ?> | ... | ... |
-
Please register or sign in to post a comment