🚀 Advanced Web Server Manager
Complete File Manager & Terminal - Standalone Version
By Sid Gifari | Gifari Industries
Current path:
/
/
home
/
users
/
2
/
fujibow
/
web
/
fujibow.co.jp
/
wp
/
wp-content
/
themes
/
wp-theme
✏️
Editing: single.php
<?php get_header(); ?> <div id="contents" class="single"> <?php if (have_posts()): while (have_posts()): the_post(); ?> <?php $categories = get_the_category(); if(isset($categories) && count($categories) > 0) : $cat_slug = $categories[0]->slug; if($cat_slug == 'works') : $fields = get_field_objects(); $postid = get_the_ID(); $img = get_the_post_thumbnail_url($postid,'large'); ?> <header class="title"> <h1> 実績 <span class="font main-title">WORKS</span> </h1> <figure> <img src="/assets/images/works/works.jpg"> </figure> </header> <section class="content"> <h2> <?php the_title(); ?> <?php if($fields['sub-title']['value']):?> <span><?php echo $fields['sub-title']['value'];?></span> <?php endif;?> </h2> <main class="main"> <figure> <?php if($img):?> <?php the_post_thumbnail('large'); ?> <?php else:?> <img src="<?php echo $assets; ?>/images/common/no-image.jpg"> <?php endif;?> </figure> <div class="text"> <ul> <li>地域 : <?php echo $fields['pref']['choices'][$fields['pref']['value']];?><?php echo $fields['city']['value'];?></li> <?php if($fields['structure']['value']):?> <li><?php echo $fields['structure']['label'];?> : <?php echo $fields['structure']['value'];?></li> <?php endif;?> <?php if($fields['building']['value']):?> <li><?php echo $fields['building']['label'];?> : <?php echo $fields['building']['value'];?></li> <?php endif;?> <?php if($fields['floor']['value']):?> <li><?php echo $fields['floor']['label'];?> : <?php echo $fields['floor']['value'];?></li> <?php endif;?> <?php if($fields['households']['value']):?> <li><?php echo $fields['households']['label'];?> : <?php echo $fields['households']['value'];?></li> <?php endif;?> <li>竣工年月 : <?php the_date("Y年m月"); ?></li> </ul> <?php if($fields['comment1']['value']):?> <h3><?php echo $fields['comment1']['label'];?></h3> <p><?php echo nl2br($fields['comment1']['value']);?></p> <?php endif;?> </div> </main> <?php if($fields['comment2']['value']):?> <h3><?php echo $fields['comment2']['label'];?></h3> <p><?php echo nl2br($fields['comment2']['value']);?></p> <?php endif;?> <?php $photos = false; for($i=1;$i<=5;$i++){ if($fields['photo'.$i]['value']) { $photos = true; break; } } ?> <?php if($photos):?> <ul class="list6"> <?php for($i=1;$i<=5;$i++):?> <?php if($fields['photo'.$i]['value']): $obj = $fields['photo'.$i]['value']; $img = $obj['sizes']['large']; $caption = ''; if($fields['caption'.$i]['value']){ $caption = $fields['caption'.$i]['value']; } ?> <li> <figure><a class="modal" data-gall="myGallery" title="<?php echo $caption;?>" href="<?php echo $img;?>"><img src="<?php echo $img;?>" alt="<?php echo $caption;?>"></a></figure> </li> <?php endif;?> <?php endfor;?> </ul> <?php endif;?> <?php endif; endif;?> <?php endwhile; ?> <?php endif; ?> </div> <?php get_footer(); ?>
💾 Save Changes
❌ Cancel