Forums

Next / Previous problem (1 post)

  1. bondbloke
    Member
    Posted 5 months ago #

    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.

Reply

You must log in to post.

About this Topic

Tags