Display single post of images as a gallery
-
Hello.
I want to display a single post of images as a gallery to the custom post type.
More specific, when the user click in the featured image of post then i want to navigate in the image gallery.My steps – process :
1) I upload the featured image.
2) I create a gallery as an example :[gallery link="gallery" ids="64,63,62"]
In the category.php :
category.php
<?php $args = array( 'post_type'=> 'portofolio', 'post_status' => 'publish', 'order' => 'ASC' ); $the_query = new WP_Query( $args ); if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <article> <div class="post-work" id="post-<?php the_ID();?>"> <a href="<?php the_permalink(); ?>" rel="lightbox[gallery]" title="<?php the_title_attribute(); ?>" > <div id="inline-content"> <?php the_post_thumbnail();?> </div> </a> </div> </article> ?>
The problem is that when i clicked in the featured image then the the gallery do not load.
Also i try to replace thelightbox[gallery]
tolightbox[gallery-1]
, change therel="lightbox[gallery]
todata-rel="lightbox[gallery]
. But the problem still remaining.Plugin details :
“Display single post images as a gallery.”
“Add lightbox to WordPress image links by default.”
“Add lightbox to WordPress image galleries by default.”
Are checked.How can fix that and navigate in the gallery?
Thanks in advanced.
- The topic ‘Display single post of images as a gallery’ is closed to new replies.