Community Forums › Forums › Archived Forums › Design Tips and Tricks › Image Gallery
Tagged: gallery
- This topic has 2 replies, 2 voices, and was last updated 11 years, 8 months ago by
gavinjb.
-
AuthorPosts
-
June 25, 2013 at 1:42 pm #47697
gavinjb
MemberI have just install BackCountry Theme and trying to work out how to get a Gallery working, I first of all looked through several of the plugins, but as yet I have been unable to find a Gallery I like, all I am after is something similar to the basic Gallery built into WP, but with forward/back buttons & a link to return to the post the gallery is in, it must have however the facility to comment on each photo in my gallery.
I have doing some googling I found an article on creating an image.php file which I have managed to get the back/next buttons to be displayed with its help, however I now have lost the comments at the bottom and it is not apply my theme, so any help would be appreciated.
The link to the article I found is http://ottopress.com/2011/photo-gallery-primer/
and the code I have so far done for the gallery is as follows (more or less copy and paste from the article!)
<?php // Get Parents Title echo "<a>post_parent). "'>Go back to ". get_the_title($post->post_parent) ."</a>"; ?> <?php // Navigation echo previous_image_link(false,'Previous Photo'); echo next_image_link(false,'Next Photo'); ?> <?php // display image echo wp_get_attachment_image( $post->ID, 'medium' ); ?> <?php // get image data $imagemeta = wp_get_attachment_metadata(); if ($imagemeta['image_meta']['camera']) { echo "Camera: " . $imagemeta['image_meta']['camera']; } if ($imagemeta['image_meta']['shutter_speed']) { echo 'Shutter: '; // shutter speed handler if ((1 / $imagemeta['image_meta']['shutter_speed']) > 1) { echo "1/"; if (number_format((1 / $imagemeta['image_meta']['shutter_speed']), 1) == number_format((1 / $imagemeta['image_meta']['shutter_speed']), 0)) { echo number_format((1 / $imagemeta['image_meta']['shutter_speed']), 0, '.', '') . ' sec'; } else { echo number_format((1 / $imagemeta['image_meta']['shutter_speed']), 1, '.', '') . ' sec'; } } else { echo $imagemeta['image_meta']['shutter_speed'].' sec'; } } ?>
I feel I must mention that my knowledge of php & html is limited and until last week I had never used WordPress so I am somewhat of a beginner and I am getting the feel that I am trying to do something a bit advanced.
If anyone knows of an plugin that can help with my requirements please let me know as I am at the stage of after something nice an easy to setup.
Thanks,
Gavin,
June 25, 2013 at 2:14 pm #47700Brad Dalton
ParticipantJetapack includes different galleries which hook into the native WordPress gallery functions. These allow commenting on images and you can also install a plugin to link each image to a custom url.
June 25, 2013 at 2:32 pm #47704gavinjb
MemberThanks, just found that, looks good, one other problem is there a way in a gallery to set the image size to Full and not medium (when viewing the single image), I have found an article (see below), but it relies on copying single.pgp as image.php and editing it, the child theme I am using doesn't have a single.php and haven't been able to find any other solutions so far.
http://nichpakaich.com/how-to/full-size-image-in-wordpress-default-gallery
Thanks,
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.