Grouping images
-
Hi, can you please help me in this situation? It took me more time than i thought.
Basically, i created a page template that retrieves images (attachment) as posts by specific category. And everything works fine, except one. I can’t group those images, i have googled many times to find solution, even with shortcode. But nothing works. That’s why i can’t choose “Next” or “Previous” when lightbox appears. Each piece has different slb ID. I hope you could help me. Thank you!<?php * Template Name: Testy get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php $attachments = array( 'post_type' => 'attachment', 'post_status' => array('publish', 'inherit'), 'category_name' => 'sagitt', 'numberposts' => -1, 'posts_per_page' => 10, 'paged' => $paged, ); query_posts($attachments); ?> <div class="gallery"> <?php while (have_posts()) : the_post(); ?> <figure class="gallery-item"> <?php the_content(); ?> </figure> <?php endwhile ?> </div> </main><!-- .site-main --> </div><!-- .content-area --> <?php get_footer(); ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Grouping images’ is closed to new replies.