We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When looking at an Image, display the next image thumbnail, and previous image thumbnail.
Example: http://mattrude.com/2011/08/summer-at-the-cabin/img_3231/
The text was updated successfully, but these errors were encountered:
The needed code, taken from the Milly theme:
<div class="image-navigation"> <div class="floatright"> <?php $attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') )); foreach ( $attachments as $k => $attachment ) if ( $attachment->ID == $post->ID ) break; $attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') )); $next_url = isset($attachments[$k+1]) ? get_permalink($attachments[$k+1]->ID) : get_permalink($attachments[0]->ID); $previous_url = isset($attachments[$k-1]) ? get_permalink($attachments[$k-1]->ID) : get_permalink($attachments[0]->ID); if ( wp_get_attachment_image( $post->ID+1 ) != null ) { ?> <p class="attachment"> <?php _e('Next Image', 'milly') ?><br /> <a href="<?php echo $next_url; ?>"><?php echo wp_get_attachment_image( $post->ID+1, 'thumbnail' ); ?></a> </p> <?php } if ( wp_get_attachment_image( $post->ID-1 ) != null ) { ?> <p class="attachment"> <?php _e('Previous Image', 'milly') ?><br /> <a href="<?php echo $previous_url; ?>"><?php echo wp_get_attachment_image( $post->ID-1, 'thumbnail' ); ?></a> </p> <?php } ?> <div class="floatright"> <?php edit_post_link('Edit Image'); ?> </div> </div>
Sorry, something went wrong.
Function is already in the theme, but it's broken.
No branches or pull requests
When looking at an Image, display the next image thumbnail, and previous image thumbnail.
Example: http://mattrude.com/2011/08/summer-at-the-cabin/img_3231/
The text was updated successfully, but these errors were encountered: