== thumbnails of next and previous images ==
@famous next and previous thumbnail images are shown by template tags –
<?php previous_image_link(); ?> and <?php next_image_link(); ?>
One quick solution for an image.php file:
- copy bp-default theme’s index.php and save to your child theme folder
- open up index.php and replace the following lines:
Replace
<div class="entry">
<?php the_content( __( 'Read the rest of this entry →', 'buddypress' ) ); ?>
</div>
With
<div class="entry">
<?php echo wp_get_attachment_image( $post->ID, 'large' ); ?>
<?php the_content(); ?>
</div>
Replace
<div class="navigation">
<div class="alignleft"><?php next_posts_link( __( '← Previous Entries', 'buddypress' ) ) ?></div>
<div class="alignright"><?php previous_posts_link( __( 'Next Entries →', 'buddypress' ) ) ?></div>
</div>
With
<div class="navigation">
<div class="alignleft"><?php previous_image_link(); ?></div>
<div class="alignright"><?php next_image_link(); ?></div>
</div>
Replace
<h2 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'buddypress' ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
With
<h2 class="posttitle"><a href="<?php echo get_permalink($post->post_parent); ?>" rel="attachment"><?php echo get_the_title($post->post_parent); ?> </a></h2>
You can also check out twentyten’s loop-attachment.php to see how image attachments are rendered along with other forms of attachment http://core.trac.wordpress.org/browser/tags/3.1.1/wp-content/themes/twentyten/loop-attachment.php