🚀 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-test
/
wp-content
/
themes
/
fujibow
✏️
Editing: archive-works.php
<?php get_header(); ?> <main id="archive" class="archive works"> <?php // ヘッダー,コンテンツ読み込み $page_header_args = [ 'slug' => 'Works', 'title' => '施工実績', 'image' => IMG_PATH.'/common/page-header-works.svg', ]; $header_type = 'header'; // ページヘッダーレイアウト get_template_part('template-parts/page', $header_type, $page_header_args); ?> <form method="get" action="#works-result" class="works__search"> <div class="inner"> <?php $taxonomy = 'works-search'; $top_terms = get_terms( array( 'taxonomy' => $taxonomy, 'parent' => 0, 'hide_empty' => false, ) ); if ( !empty( $top_terms ) && !is_wp_error( $top_terms ) ) : foreach ( $top_terms as $top_term ) : //var_dump($top_term); ?> <div class="works__search-row"> <div class="works__search-parent"><?php echo $top_term->name; ?></div> <div class="works__search-items"> <?php $sanitized_cats = []; if( isset($_GET['works-cat']) ){ $sanitized_cats = array_map(function($cat) { return intval(htmlspecialchars($cat)); }, $_GET['works-cat']); } $check_terms = get_terms( array( 'taxonomy' => $taxonomy, 'parent' => $top_term->term_id, 'hide_empty' => false, ) ); if ( !empty( $check_terms ) && !is_wp_error( $check_terms ) ) : foreach ( $check_terms as $check_term ) : $checked = ''; if (in_array($check_term->term_id, $sanitized_cats, true)) { $checked = 'checked'; }; ?> <label class="works__search-item"><input type="checkbox" name="works-cat[]" value="<?php echo $check_term->term_id; ?>" <?php echo $checked; ?>><span class="checkbox-status"></span><?php echo $check_term->name; ?></label> <?php endforeach; endif; ?> </div> </div> <?php endforeach; endif; ?> <div class="works__search-btn btn--center"> <button type="submit" class="btn btn--small works__search-submit js-search-scroll"><span class="btn__icon"><?php svg_iconSearch(); ?></span>検索</button> </div> </div> </form> <div id="works-result" class="works__result"> <div class="inner"> <h2 class="works__result-title">検索結果<span class="works__result-title-count"><?php echo $wp_query->found_posts; ?></span><span class="works__result-title-unit">件</span></h2> <?php if (have_posts()) : ?> <ul class="works__grid"> <?php while (have_posts()) : the_post(); ?> <li><?php get_template_part('template-parts/archive-article-works'); ?></li> <?php endwhile; ?> </ul> <?php else : ?> <p class="no-post">現在施工実績はありません。</p> <?php endif; ?> <?php get_template_part('template-parts/archive-pagination'); ?> </div> </div> <div class="page__bottomNav inner"> <div class="page__bottomNav-item"> <img src="<?php echo IMG_PATH; ?>/strength/bottomNav-strength.jpg" alt="" class="page__bottomNav-bg"> <div class="page__bottomNav-body"> <h2 class="page__bottomNav-title font-en">Our Strength</h2> <a href="<?php echo esc_url(home_url()); ?>/strength/" class="page__bottomNav-link"><span class="circle-arrow"></span><span class="link-blue">選ばれる理由</span></a> </div> </div> <div class="page__bottomNav-item"> <img src="<?php echo IMG_PATH; ?>/owner/bottomNav-owner.jpg" alt="" class="page__bottomNav-bg"> <div class="page__bottomNav-body"> <h2 class="page__bottomNav-title font-en">For Owner</h2> <a href="<?php echo esc_url(home_url()); ?>/" class="page__bottomNav-link"><span class="circle-arrow"></span><span class="link-blue">修繕をお考えの皆様へ</span></a> </div> </div> </div> </main> <?php get_footer(); ?>
💾 Save Changes
❌ Cancel