Title: Next / Previous problem
Last modified: August 20, 2016

---

# Next / Previous problem

 *  [bondbloke](https://wordpress.org/support/users/bondbloke/)
 * (@bondbloke)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/next-previous-problem/)
 * I am having problems with next/previous links on a photoblog theme I am working
   on this:-
 *     ```
       <div class="previous">
       <?php previous_post_link('%link', 'Previous post'); ?>
       </div>
   
       <div class="next">
       <?php next_post_link('%link', 'Next post'); ?>
       </div>
       ```
   
 * works perfectly backwards and forwards through the images until it comes to the
   oldest image when I get:-
 * “Warning: exif_read_data() [function.exif-read-data]: Filename cannot be empty
   in C:\wamp\www\wordpress\wp-content\themes\image-a-nation\index.php on line 95”
 * I am using this:-
 *     ```
       $size = "full";
   
          $photos = get_children( array(
           'post_parent' => $post->ID,
           'post_status' => 'inherit',
           'post_type' => 'attachment',
           'post_mime_type' => 'image',
           'order' => 'ASC',
           'orderby' => 'menu_order ID') );
   
       		if ($photos) {
       		$photo = array_shift($photos);
       		$result = wp_get_attachment_url($photo->ID, $size);
       	}
   
       $imgurl = $result;
   
       $exif = exif_read_data($imgurl, 'EXIF');
       ```
   
 * to pick up the image location to enable the fucntion to read the exif data from
   it, but can’t figure out why it is not picking up the location of the oldest 
   image.
 * Any ideas would be much appreciated.

The topic ‘Next / Previous problem’ is closed to new replies.

## Tags

 * [next](https://wordpress.org/support/topic-tag/next/)
 * [previous](https://wordpress.org/support/topic-tag/previous/)

 * 0 replies
 * 1 participant
 * Last reply from: [bondbloke](https://wordpress.org/support/users/bondbloke/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/next-previous-problem/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
