![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I want to show some exif information in the content part - rightpost - od my post_photo.php. I was reading that wordpress can do that with:
$imgmeta = wp_get_attachment_metadata( $id ); the whole thing should look like this then: < ?php if (is_attachment()) : $imgmeta = wp_get_attachment_metadata( $id ); echo "<ul>\n"; echo "<li>Dimensions: " . $imgmeta['width']." x ".$imgmeta['height']."</li>\n"; echo "<li>Aperture: f/" . $imgmeta['image_meta']['aperture']."</li>\n"; echo "<li>Camera: " . $imgmeta['image_meta']['camera']."</li>\n"; echo "<li>Date Taken: " . date("d-m-Y H:i", $imgmeta['image_meta']['created_timestamp'])."</li>\n"; echo "<li>Copyright: " . $imgmeta['image_meta']['copyright']."</li>\n"; echo "<li>Focal Length: " . $imgmeta['image_meta']['focal_length']."mm</li>\n"; echo "<li>ISO: " . $imgmeta['image_meta']['iso']."</li>\n"; echo "<li>Shutter Speed: " . number_format($imgmeta['image_meta']['shutter_speed'],2)." seconds</li>\n"; echo ""; endif; ?> Still i can't get this to work. There is no error message, but the theme is not showing anything. Any ideas...thx |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Exif data | Marijn | General Discussion | 1 | 08-07-2009 08:43 AM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us