Hi,
In the default theme, if you click on an image in a gallery, it takes you to a page generated via image.php. Do any of you know how to display the original gallery in this page?
thanks :)
Hi,
In the default theme, if you click on an image in a gallery, it takes you to a page generated via image.php. Do any of you know how to display the original gallery in this page?
thanks :)
This should work:
<?php
$post_parent = get_post($post->ID, ARRAY_A);
$parent = $post_parent['post_parent'];
$attachments = get_children("post_parent=$parent&post_type=attachment&post_mime_type=image&orderby=menu_order ASC, ID ASC");
foreach($attachments as $id => $attachment) :
echo wp_get_attachment_link($id, 'thumbnail', true);
endforeach;
?>Thanks greenshady :)
Nice code, do you know how we can define the number of thumbnail per page or how to build a pagination with this code because I have more than 1000 images to display in this main gallery!
Thanks for your help
henri
Anybody know how I spilt the gallery generated by this code (how to make a pagination?)
Thanks
henri
You must log in to post.