53 lines
1.2 KiB
PHP
53 lines
1.2 KiB
PHP
<?php
|
|
get_header();
|
|
global $photocore;
|
|
$term_id = get_queried_object()->term_id;
|
|
$current_term = get_term($term_id);
|
|
?>
|
|
|
|
<?php
|
|
$query_images_args = array(
|
|
'post_type' => 'attachment',
|
|
'post_mime_type' =>'image',
|
|
'post_status' => 'inherit',
|
|
'posts_per_page' => -1,
|
|
'tax_query' => array(
|
|
array(
|
|
'taxonomy' => 'attachment_keyword',
|
|
'field' => 'slug',
|
|
'terms' => $current_term->slug,
|
|
),
|
|
),
|
|
);
|
|
$query_images = new WP_Query( $query_images_args );
|
|
|
|
while ( $query_images->have_posts() ) : $query_images->the_post();
|
|
$ids_array[] = $post->ID;
|
|
endwhile;
|
|
$ids = implode(',', $ids_array);
|
|
|
|
?>
|
|
|
|
<div id="primary" class="content-area">
|
|
<main id="main" class="site-main">
|
|
|
|
<div class="single-attachment_keyword large-container top-and-bottom-margin">
|
|
<div class="page-header medium-container">
|
|
<div class="label">
|
|
<?php _e('Keyword', 'yuzu'); ?>
|
|
</div>
|
|
<h1 class="page-title"><?= get_queried_object()->name; ?></h1>
|
|
</div>
|
|
|
|
<div class="attachments-list">
|
|
<?php
|
|
echo do_shortcode('[gallery mgl-layout="default" ids="'.$ids.'"]');
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</main>
|
|
</div>
|
|
|
|
<?php
|
|
get_footer();
|