WordPress.org

Ready to get started?Download WordPress

Forums

help for Gallery pagination (1 post)

  1. biateau33
    Member
    Posted 1 year ago #

    First, excuse me for my english but i'm french...

    I try to view a gallery with all the images in the blog page.

    I manage to display the images but I can not show 12 images and a navigation links to other images ...

    I hope you understand what I want to do ... here is my code to display the images, I'm missing the code for the navigation

    <article class="grid_24">
    
    					<?php
    
    					if ( have_posts() ) : while ( have_posts() ) : the_post();    
    
    					$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    					 $args = array(
    					   'post_type' => 'attachment',
    					   'numberposts' => -1,
    					   'posts_per_page' => 4,
    					    'post_mime_type' => 'image',
    						'paged' => $paged
    					  );
    
    					  $attachments = get_posts( $args );
    						 if ( $attachments ) {
    							foreach ( $attachments as $attachment ) {
    							   echo '<div class="grid_6">';
    								echo '<div class="galerie4 maxheight">';
    									echo wp_get_attachment_image( $attachment->ID, "projet_thumb4col");
    							   echo '</div></div>';
    							  }
    						 }
                        endwhile; ?>
    
    					<div class="grid_24">
    
    					<!-- Pagination galerie -->
    
    					</div>  
    
    					<?php endif; ?>					
    
    					<div class="clear"></div>					
    
    				</article>

    I have not had any response on the French forums ... I hope someone here will have an idea!

    Thank you in advance

Topic Closed

This topic has been closed to new replies.

About this Topic