Thesography
What is Thesography?
Thesography displays EXIF data for images uploaded with WordPress. It utilises WordPress’ own feature of storing EXIF fields in the database, and also enables import of latitude and longitude EXIF to the database upon image upload.
Thesography was originally meant for use with the Thesis theme from DIYthemes, thus the name, but I decided to make it useful for all WordPress themes.
I’ve been using EXIF display on my photoblog for some time. I’ve also written a couple of posts about EXIF with WordPress; Geo EXIF data in WordPress and Add image EXIF metadata to WordPress. Some people expressed a desire to see this functionality in a plugin without modifying WordPress files: this is it.
The purpose of this plugin is to make dislaying EXIF data as convenient as possible, while using as much of WordPress’ native image handling as possible — for convenience, forward compatability and because WP image handling has come a long way in recent years.
Download current version
Please leave praise, criticism and bug reports in the relevant thread.
Discussion threads
Installing the plugin
- Upload the thesography folder to your wp-content/plugins directory.
- Visit the plugins page of your WordPress dashboard and activate the plugin.
- Visit the Thesography Options page under Settings in your WordPress dashboard.
For EXIF data to display correctly it is essential to visit the options page the first time you activate the plugin; it is not essential to save the options, unless you change any of the defaults.
Display EXIF automatically
Automatic EXIF display only works with the Thesis theme (at this time) and will only show the EXIF for the first image attached to the post.
To automatically display EXIF data at the end of your posts with the Thesis theme you need to select the EXIF items you wish to be displayed. This can be done on the options page by selecting the default items for all future posts, and can be edited for individual posts in the Write panel.
As of version 1.0.3 you can now turn automatic insertion off. Use this if you would like to use the default display options with manual insertion. The code for manual insertion using the options is below and discussion of custom insertion on certain pages is in the v1.0.2 discussion thread.
Display EXIF via shortcodes
EXIF data can be displayed anywhere in your posts via shortcodes. Unlike automatic display, you can display EXIF for multiple images when using shortcodes by specifying the ID of the image.
Use the syntax [exif].
By default the shortcode will display all available exif items for the first image attached to the post.
Display certain EXIF fields
To select the fields you want to display use the attribute “show”.
[exif show="aperture,location,shutter"]
The following list contains valid arguments for the attribute “show”.
- all
- aperture
- credit
- camera
- caption
- time
- copy
- focus
- iso
- location
- shutter
- title
Display fields for specific (and multiple) images
To show the EXIF for a specified image and potentially multiple images within a post, use the attribute “id”. To show multiple images, use the whole shortcode multiple times with different IDs.
[exif id="457"]
You can find the ID of the image by viewing the HTML of the image inserted into the post, which will contain something like wp-image-457, where “457″ is the image ID. Or by finding the link to edit the image in the Media Library, where the end of the URL will be something like media.php?action=edit&attachment_id=457.
Add EXIF display to your theme
You may also add EXIF data to your theme manually using the function <?php echo display_exif($option,$imgID); ?>. This can be used within the loop, with or without an image ID, or outside of the loop if an image ID is provided.
The function accepts two parameters: the options for the EXIF items to display and the image ID. If no image ID is provided it will default to the first image attached to the post. The options parameters are the same as those for the shortcode parameters. By default, all available EXIF fields are shown when the function is called.
Display only some fields of the first attached image
echo display_exif('aperture,shutter,iso');Display all fields of a certain image
echo display_exif('all',457);or
echo display_exif('',457);Display certain fields of a specific image
echo display_exif('aperture,shutter,iso',457);Use options in post edit page
If you are using a theme other than Thesis, but would still like to use the options in the Edit Post page you can use the following code within the loop.
$exif_options = get_post_meta($post->ID, '_use_exif', true); echo display_exif($exif_options);
To use the above outside the loop, replace $post->ID with your required post ID and add the image ID to display_exif.
Localisation
As of version 1.0.3 Thesography now has proper language support.
Big thanks to Alejandro Herroro for working out the bugs with language file referencing in v1.0.2.
Download language files
Spanish — courtesy of Alejandro Herroro
License
Thesosgraphy is licensed under the GNU General Public License.




{ 154 comments… read them below or add one }
Sweet plugin – I remember getting your help a year or so back now for use on my own blog! Just one small suggestion – perhaps you could include the option to display a Google Maps thumbnail similar to the one I used to have on my old site (screenshot here).
That would be a cool addition :)
Hey Ben,
Thanks! That is a good idea, which previously went fleetingly through my brain. I will definitely add something like that in a future version. Another thought I had is to add a map overlay.
Will see how this goes and what other kinds of requests I get.
This is so awesome! I’ve been thinking of adding a photo blog page to my site and this plugin is going to rock. Thank you! :)
Thanks RowdyKittens! Good to know someone is keen :-)
Hi Kristarella!
Thank you very much for this plugin, I was searching one for the EXIF data of muy photos y there is very few plugins about this features. That if the plugin works good, like yours :)
You wrote in my blog yesterday about the translation that I did in your plugin, This is what I did:
I edit the thesography.php, I have searched the string of “$exif_list = $before_block;” and I translate the exactly words that appear at the post. Not the admin and the post page where i write the posts. My knowledge of php (and English) is almost null :). If you want I can send you the part.
You ask me if you should do the plugin more accessible for non-English blogs. I think with a little English that the user knows the “Thesography Options page” is easy to manage. But always is better if the plugin is in your language.
You can always give the option for people to translate the text strings to your language using a single file containing those strings for example.
About the design if you want some advice I could tell some like… that the list of exif data were in a table of diferent color… (one color each row) or/and in two colum (and that the user could choose which in colum put them) for occupy less part of the post and stuck to the image, like a frame of the photo. All this with a CSS file that the user could edit for adapt the color at your blog.
Good, this are some ideas that I had now about your plugin I hope I have helped. I
I´ll use your plugin during some time from now in all my photos :D
Greets!
Thanks so much for the feedback Alejandro!
I will definitely include language files with the next release of the plugin. I don’t know if I will make the data into a table with included CSS, but I will write a tutorial about how to use the Options page and theme CSS file to customise the look.
Hi,
Great initiative, as EXIF seems to be totally ignored by most WP theme creators and incomprehensibly by the photo blog themes!!!
There is one major functionality missing – dispalying EXIF as pop-up only when user is mousing/pointing on the image, and thus only receives EXIF info when wanted. EXIF info is not interesting to the majority of visitors, and takes away space from the photo blog, as well as disturbs the visual ambience of the layout and photo.
Currently you only display the location data when the visitor mouse over the image. Half of this information is already in the title (Bridge at night), so why not use the location as the title, and instead display the EXIF when user points to the image?
Are you going to add this funtionality?
Regards
Morten Ross
YOu only have
Hey Morten,
Thanks for the feedback.
By pop-up, do you mean as a simple title attribute (displayed by most browsers as a small yellow box) or something a bit fancier, like a hidden box that fades in with javascript when you hover over the image?
The EXIF can easily be displayed as a title attribute by inserting the shortcode into the title attribute when editing the post in HTML mode. It would look something like like:
<img src="http://www.example.com/image.jpg" alt="Example Image" title="[exif id="3520" show="all"]" width="800" height="500" class="frame size-full wp-image-3520" />To do that you would want to change the default settings for how the exif is displayed so that there is no HTML, perhaps just separate the items with commas and a space.
Not sure what you mean about the location data: on that photo you mention it says “Sydney Harbour Bridge at night” upon hover because that’s what I named the image in the WordPress gallery (so WP gave it that as a title attribute), but I only titled the post “Bridge at night”. The location data is in the list below the photo with all the other exif; it shows the latitude and longitude and links to Google maps.
Hi,
I would most definitely prefer your latter suggestion – “like a hidden box that fades in with javascript when you hover over the image”. This is how Jalbum has had it for many years.
Since you have the name of the place partly in the file name and in the title it’s rather fragmented. Either all the info should be in the file name or in the title not 50% file and 50% title.
I think the title should contain the full description, and the hover-info should contain all EXIF.
Is this something you will or can work on?
If you see my Jalbum-based photoalbum, EXIF is displayed either as a slide-in data sheet when you point on image, or as a sticky board: http://www.ross.no/photogallery/
I tried your shortcode, but to no avail, so I do not know how this would look. Will it come all on one long line, or will it be displayed as a list?
How do I change the default settings for how exif is displayed?
PS: I use Woothemes’ Aperture.
Morten
Morten — had trouble seeing what you meant about Jalbum at first, it doesn’t work properly at all in Chrome.
The file name and title stuff has nothing to do with the plugin and everything to do with how I handled the image while I was posting it. I merely gave the image a slightly more descriptive title than I gave the post, there’s no 50-50 about it, all the technical data is still in the EXIF. It would be similar to naming a post “Flowers in spring” and then showing an image with a title attribute “Cherry blossom tree”, it’s just more specific.
The markup used to display the EXIF can be edited on the Thesography Options page under “Your custom HTML”. By default it is displayed as a list; if you were to add it to the title attribute of the image you would need to remove the
<ul class="exif">and all the other HTML bits and just use a comma to separate the items. If it’s not displayed in the title attribute then any HTML format can be used.I don’t know if I would want to include a fancy javascript display with the plugin because the behaviour and style of such a thing would vary so greatly from theme to theme and user to user, as well as introducing a bunch of accessibility questions. E.g., if the EXIF is shown in the post, but hidden and displayed with javascript, should it be in the RSS feed? And, what if someone is viewing your site on their mobile and have no hover action, should they just not be able to see the EXIF?
It would be quite simple to implement a javascript EXIF display on your own blog. As long as the EXIF is displayed successfully to begin with, you could pop a bit of jQuery in the head of your site and a bit of CSS should give you the effect you’re looking for. I’d be happy to write a tutorial on it, but I don’t want to rush into including it in the plugin itself until I’ve figured out how to make it as flexible as possible to suit most users’ needs.
Hi,
Chrome is not a problem – I use latest version of Chrome and the Jalbum at http://www.ross.no/photogallery works like a charm. Do you have problems with your version of Flash?
It also works in Opera, firefox and Internet Explorer.
I have tested it further and got the exif to be displayed as a context pop-up/title attribute but rather than as a list, it’s all on one line. What do I use (in Thesography Options) to force line feed after each exif item (name + value)?
Then comes the major obstacle:
As images in Aperture are displayed via a custom setting in Aperture theme using an url like “http://www.ross.no/communicate/wp-content/2009/10/DSC_0336b.JPG”, it’s not possible to add attributes, as far as I know at least.
I can supply screenshots of the Aperture settings page if necessary.
As long as images are supplied inside the post itself, this will w ork in “Aperture-land”, it seems…
Looking at your http://www.kristarella.com/thesography/#shortcode-params,
and “Use options in post edit page”:
$exif_options = get_post_meta($post->ID, ‘_use_exif’, true);
echo display_exif($exif_options);
Which file should this go into?
BTW: It also displayes non-checked item “Taken” which should correlate to “Creation time” which I have not selected.
Morten
Morten — I was using Chrome on mac, it’s still in the developer stage, so it can be buggy, just thought I’d mention for future reference in case you ever see a problem.
You can’t have line breaks in the title attribute; I’m afraid they’re very limited.
As long as the images have been uploaded by WordPress, the EXIF will be accessible to Thesography. The best way to insert the Thesography code varies for different themes and different user purposes.
If your theme uses hooks (I don’t think WooThemes do) it can go in functions.php in the theme folder to be inserted within the theme. Otherwise it needs to go straight into the theme template files in “the loop”: between
while (have_posts()) : the_post();andendwhile;(or they might use{instead of:and}instead ofendwhile;). This will display the EXIF for only the first image attached to every post. For showing the EXIF for multiple images, shortcodes must be used in the post with the image ID and specifying which EXIF to use.Did you want me to write a post about making a javascript popup?
If you’ve only used the shortcodes so far, they do not utilise the default checkbox options for which EXIF fields to show (they’re designed so that they can be used for multiple images in a post and showing different sets of EXIF, if needed).
Hi again,
OK, title attribute is a dead end, as info can only be on one line. Also the shortcode is not really viable as it can only be used in the posts, and in my posts the majority only have one photo, and that is controlled by Aperture theme. Even though all h ad more than one photo, it would look lame with exif only on photo # 2 and onward.
Seems javascript is the only way, unless you would like to join the WooThemes community :-) ?
They still don’t know how to incorporate this into their themes, but there are many users that really want this…
I’m definitely interested in seeing what you have on making a javascript popup, so much appreciated if you would like to elaborate :-)
Morten
Hi Kristarella!
I just updated my plugin (1.0.1) and I had a new idea for future version of the plugin!
At the plugin page admin you could put a “menu” so the user put in order that he likes the data exit in the post.
Pardon but my english tonight is… very bad xD
One kiss
Morten — Sorry for the delay, I didn’t get your comment on email, or lost it when my browser crashed or something and only realised you’d made it later.
I just published a post about javascript popups with Thesography.
In the Aperture theme, do you still have to upload the photos via the WordPress uploader? If so, you should be able to retrieve the image ID and insert the EXIF for the image at the start of the post via the shortcode. Then, even though the image is displayed by the theme using a custom field, it will be just before the EXIF data in the HTML and the javascript I wrote will be able to find it and show/hide it.
Alejandro — Thanks for the suggestion. I will think about how I might go about doing that.
Also, making a language file for the plugin is high on my list of priorities! I spent most of Friday trying to make one, but the software I tried was not working. It should be there in the next update though.
Hi,
I think the need for the user to both find and enter the image ID is cumbersome and very time consuming. Just think of those who’s got hundreds of posts and photos that must be edited to include this information. The image ID could be retrieved using a variable, and thus be generic.
I think the best approach and logic would be:
1: Detect if user is pointing mouse over image (allready in place by you)
2: When yes – retrieve the image id. Using image id variable, not actual id, to automate – e.g [exif id=%Image_ID%]
3: display Exif either below image or via Java popup according to user’s preference (allready in place by you)
Regards
Morten
Morten — It is easy to find the image ID by inserting the image into the post, the ID is shown in the class
wp-image-ID. It is an unfortunate step for those who weren’t already going to insert the image using the conventional method, I agree.I would never suggest that anyone edit their old posts to include the shortcode. The plugin, with its limitations as it now stands, would be useful for future posts using the shortcode. Or as I’ve mentioned in the documentation, for the first image attached to old (and future) posts if you put the
display_exif()function in your theme files.The only information accessible to the javascript (since it is only active after the page loads) is whatever is in the HTML of the page. However, all of the Thesography processing, and your theme processing, happens before/while the HTML is rendered, and independently of each other. So, the theme doesn’t make the image ID available to the javascript. Meanwhile, Thesography does get the ID of the first image automatically if you insert the code in the loop, but only the first image attached to the post because if it did more than that it wouldn’t know where to place the EXIF data in the post (it knows the images are attached to the post, but doesn’t know if they are rendered in the content of the post).
I’m not sure if what you’re asking is possible. It’s entirely possible to write a theme that does what you’re asking, but it sounds like your theme might be straying far enough outside the normal workings of WordPress that I can’t externally influence it in the way you’re describing. I will keep thinking about it though.
Morten — Just realised… The default action for Thesography when no image ID is provided is to use the first image that was uploaded/attached to the post. If the first images in your posts are the first ones uploaded then you don’t need to find their ID, Thesography already knows it. You would only need to find the ID of the subsequent images in the post to show their unique EXIF, which is not so hard because you just look at
wp-image-IDin the HTML view when editing the post.I haven’t tested it this way, but you should be able to use Thesography without an ID for the first image and then with IDs for the rest. And that would include inserting the
display_exif();at the start of posts in the template file (this is the instance without ID) and then use the shortcode in-post when you have a post with multiple images.Hi,
Where excactly do I put “display_exif(); ” – which template file are you referring to?
Does this work with your java popup?
Morten
Morten — The info for the usage of the function is above. It goes within the loop. The location of the loop might vary from theme to theme. Usually it will be in index.php or single.php for a single post page.
It will work with the javascript if you’ve visited the Thesography options page as per the installation instructions.
Hi,
Sorry for being dim, but when I put the code in the loop (line 3 in single.php) the code and not the value is displayed in the post.
See my single.php in a separate mail to you.
Morten
Would it be at all possible to cycle through each image in posts and insert the shortcode automatically after each element, using its ID (or rather, class, like wp-image-12)? I’m developing a photoblog theme that allows multiple photos in each post, and I’d rather not force the author to automatically enter the shortcode and image ID in their post.
Thanks for the great work!
Gavin — I’m not sure if any of the discussion with Morten above will help or process ideas for you, but in short, no. Unless you’re automatically inserting those images into the post through your theme according to the images attached to that post, then there’s no way (that I know of) to automatically add the EXIF for multiple images. The reason being that Thesography collects the EXIF data from the database according to the images attached to the post, but the user can add whatever images he wants into a post, in any order, whether they’re attached to the post or not.
In theory I suppose you could write a script that checks through the contents of the post, finds something that looks like
"src="http://image.jpg"then try to match that image URL to the post meta data and get the image ID and then get the EXIF. However, that is purely hypothesis at this point, I don’t know if it would work.Gavin — Missed the bit about doing it by classes… That might be a bit easier than what I said above because it doesn’t require matching against the database, but still it’s a bit of PHP that I can’t come up with off the top of my head. You might be able to do that, it would involve getting
the_content()as a variable, searching forwp-image-*in it, making that a variable from which you extract the numbers and then after the next line break insert the shortcode.Take this tutorial for example, if
$str = the_content()and$pattern = "wp-image-" . "([0-9]+)"(not sure if my regular expression is correct there, but it’s along those lines) then you would search for$patternin$str. I’m afraid that’s about the pointing and waiving of hands that I can do on my limited internet connection at the moment. Hope it was useful in soem way.hi Kristarella,
first of all, my compliments for this great plugin! I got it working perfectly also with the jquery hover box. my only questions is, if there is a possiblity to use a different order for the EXIF items other than the default alphabetical one?
many thanks in advance for your help.
greetings,
Alex
Alex — Great that you’ve got it working! Alas, there is no custom order of EXIF items as yet, but it’s a great idea and I’ve added it to my list of things to add. For now the only way to rearrange it would be to rearrange it in the plugin file itself.
Hi,
I’m using Wordpress 2.9.1 and before activating you plugin, I was able to upload photo’s using the standard Wordpress functionality. After activation of the plugin, the upload just stops during the crunching process of the uploaded image.
Is your plugin ready for use with WP2.9.1?
If not, will you be updating your plugin so it can be used?
If yes, what could be the problem?
Best regards,
Wessel
Hi,
I’m also using WP 2.9.1 and do not have any problems uploading images with Flash or default method.
Does it fail also with a small 100Kb sized image?
If you enable PHP error messages, you should see the error.
Morten
Wessel — I haven’t checked Thesography with WP2.9.1 yet. I was without internet for about a month when WP2.9 and 2.9.1 conveniently came out. I will be updating the plugin and making sure it all works, but I don’t know when I’ll be doing that.
There are lots of causes for the upload to pause in the middle of crunching, including a very large image (they usually fail to crunch at all between 1 and 2MB, or smaller if it’s a poor internet connection), a server with little processing power, exceeding the server’s PHP memory limit etc.
Morten — Thanks for your response! Glad to hear it’s working, at least on some servers.
Yes, I´m too in WP 2.9.1 (linux @ aruba.it) and It´s working :)
Hi Kristarella and Morten,
I found out that it wasn’t the plugin causing this behaviour. It has everything to do with the theme I used. This theme prevented me from uploading images in combination with your plugin. The theme also prevents that the exif metadata is put in the database. As soon as I switch to the default theme I’m able to see the EXIF information in the database.
Thanks for the replies.
For some reason 1.0.1 and WP 2.9.1 isn’t working together for me. When I activate it I can not access my Admin.. I have to goto PHPAdmin and deactivate the plugin manually to get back in to the Admin.
Scott — Sorry for the trouble, I don’t know why that would be. To be honest I haven’t had the chance to even upgrade my own sites yet, let alone test the plugin. A couple of people have said above that it’s running fine for them. Can you let me know what other plugins you’re running and your host stats (i.e. version of PHP, version of mySQL, operating system on server, or if you don’t know that just who the host is). It could be an incompatibility with another plugin. Is it only the admin that you can’t access, nothing else of the site goes down? Do you see any error messages? Does your host keep error logs?
No worries :-)
My host is Dreamhost
WP 2.9.1
The site doesn’t go down, just the admin sections. Here is a list of all of my plugins.. Not all are activated because of incompatibility
After The Deadline, Akismet, Contact Form 7, DISQUS Comment System, FancyBox for WordPress, FreeCharity.org.uk WordPress Petition, Google XML Sitemaps, Page Links To, Popular Posts, Post-Plugin Library,Really Simple CAPTCHA, Similar Posts, SlidePress, Thesis OpenHook, Thesography, WP-Cycle , WP-DBManager, WP-Optimize, WP-SpamFree, WP Lessn, WP Shopping Cart, WP Smush.it, WPtouch Phone Theme, WP_Auctions
I’m also using the plugin “Better Plugin Compatibility Control” to test compatibility
Scott — Thanks for that. I have another report of issues including error messages, so hopefully I can pin the problem down, although at a cursory glance Thesography shouldn’t invoke those files in WordPress at all. I will work on the problem as soon as I can (in the morning I hope), but for now it seems Thesography 1.0.1 is only working on some WP 2.9.1 installs.
No rush, the plugin does rock!
Hi,
I’m very excited about your plugin, great work. Only one thing that I would like extra. Is it possible somehow to have the date of the (first) picture as the post date?
Greets, Wessel
Hi all, there’s an update for Thesography coming through. It was causing an error related to internationalisation files in WordPress 2.9.1, but it only seemed to happen on new installs of Thesography, at least when I tested it. This should be fixed now.
Wessel — Not really, unless you edited the post date manually in the Edit Post dashboard. For visual purposes you could display the image date instead of the post date on your posts by adding
echo display_exif('time');to your template, but WordPress would still be taking the post date into account for chronological order purposes.Oops! Forgot to mention that there are now localisation files in the languages directory of the plugin, so folks like Alejandro can more readily change the language of the plugin output. Check out Poedit if you want a visual editor for the file and need to create a new .mo file.
The new version worked for me!
Hi, kristarella! ;)
Thanks for the languages files :). I have the Poedit already and I have translate some sentences (I´m new in this programm).
I have saved the .po file and .mo file automatically is update with the new text. In this moment I upload the files to my server and I dont see the translations.
Do I have to do something to see the translation? Renaming the files?
I hope you can help me and we translate the plugin to more languages :)
Alejandro — I’m a bit new to this whole thing, but in this tutorial there’s a bit at the end about translating. You might need to save your file as thesography-es_ES.po (and the automatically generated .mo as well) if you have your WordPress install set to Spanish.
Hi again:
Nothing, I had been all morning with the po and mo file and the translation doesnt work.
I’ve renamed (thesography-es_ES. *, en_ES….) and nothing. I have also searched in internet about the and I have found few things. Something like that the .po or .mo file must be together with the .php file but nothing. Or even I left the spanish version alone and doesnt work
I will continue searching and I´ll notify you when it´s works or find something.
Bye bye
P.D. I sent you the unfinish version of spanish to your email for if tou want try it in your server.
Alejandro — I didn’t have much know-how to test with, but perhaps the language files are not pointed to correctly in the plugin? On line 30 changing
$plugin_urlto$plugin_url/languages/might help. If you want to try it let me know how it goes, otherwise I will try more testing when I can.Thanks for the advice, but it doesnt work. I´ll continue searching.
Thanks for everything :)
this plugin need “php –enable” on the php server ?
AE Christian — I’ll be honest, I have no idea what that is. I’m not aware of “php –enable” being a thing by itself, I’m aware of having to enable zip or enable mod-rewrite etc. No, I don’t think this plugin requires any extra plugins. It requires WordPress to be installed and WordPress requires the PHP exif extension to extract the EXIF data from the image to the database.
Hi
First of all, my compliments for this great plugin! I got it working ok, but I didn’t want the title to be shown, so I didn’t click the title box but it stills shows? So now I went into the plugin and manual removed the lines I don’t want to be shown.
What I really would like is that I have the option to show wetter the flash was fired or not.
Regards
Catarina
Hi Catarina,
Once a post is saved it keeps it’s own record of which EXIF to show, so you might have removed it from the default options, but not the posts already saved? Let me know if that’s not the case and I’ll look into it.
Yes, flash fired is a good idea, I’ll look into adding that.
Hello!
Is the [exif] shortcode supposed to work in the excerpt field?
I’ve just tried without success (WP3 beta), with or without ID number.
It works in the post.
Tanks for your good work
Alessandro
Alessandro — No, by default the WordPress excerpts will generally strip tags out or ignore them to present excerpts as plain text. I’m not sure if adding the code in this forum thread will work, or perhaps the Advanced Excerpt Plugin. The only other option I can think of is to create an excerpt filter (similar to these) to add the exif, but it would only be adding it before or after the excerpt, not sure it would help if it should be in the middle of excerpt text.
Wow, thank you, that was quick!
The easy filter in the functions.php did the trick.
I am trying to design a fully integrated photoblog, using the (easier) custom post type capabilities in WP3, and your plugin comes really handy! :-)
Best
Alessandro
Alessandro — Great! Glad that worked. Send the link to your site when it’s ready — I’d love to see it!
Thank you so much for your work on this. I had been looking all day for a solution and luckily came across your plugin. This is exactly what I needed for a photo blog I am currently developing.
Excellent job!
Hello
Thanks for that great plugin, I have only a small problem when I use this shortcode : [exif id="XXXX" show="aperture,copy,camera,iso,shutter"] I get also the image title. what can I do to correct that?
You can see some example here:
http://www.blues-and-pictures.fr/?attachment_id=689
regards
Michel — It’s because the shortcode has been places within the alt attribute of the image, so the rest of the image HTML (i.e., the title attribute) is parsed incorrectly. If you want to put the exif in the alt attribute you need to remove all the HTML markup (i.e.,
<ul class="exif">and<li>etc) from the options page because image attributes cannot have HTML markup in them. If it was mistakingly placed there, go into the HTML post editing view and make sure the shortcode is placed after all the image HTML.Adam — Awesome! Do let us know when your photoblog is ready to see!
Hello. Thank you for the fast answer and the explanations. I am going to correct the blog, best regards.
Hi,
I am trying to use the plugin within my theme (not using shortcodes) and I am using a custom post type. I can’t get the EXIF data to display at all. Does this have something to do with the dashboard module not appearing when I create a post in my custom post type? If so do you know how I can get the EXIF module to show up when creating custom posts?
Do I have to register something specific in the functions.php where I declare what attributes my custom post should have?
Any light you can shed on this would be great.
Thanks
Craig — Ah, I hadn’t done extensive testing with WP 3.0, I just know it works because I upgraded my site and the plugin still works… Custom Post Type compatibility is definitely needed. I’ve figured out how to do that using the
register_meta_box_cbparameter for theregister_post_type, but I’ll need to put through a plugin update for that.In the mean time, add the line
'register_meta_box_cb'=>'thesography_meta_box_cb'to yourregister_post_typefunction and then add the following function after your post type registration.function thesography_meta_box_cb() { if( function_exists('add_meta_box')) : global $post; $custom = get_post_type($post->ID); add_meta_box('thesography_add_meta', __( 'Add EXIF to post', 'thesography' ), 'thesography_edit_post_exif', $custom, 'side', 'low'); endif; }This function will be included in the plugin update and you can delete it when you update the plugin, but you can use it in your functions file until then so you’re not waiting on me to push through the update while you work on your site.
Awesome plugin, you perth chicks rock… :-)
Thanks for sharing all your knowledge on the uses of Thesis…
You are providing great value to the Thesis community…
Keep em comin…
Regards…
Hi,
Good stuff! I’m new to this exif stuff so please bear with me.
I have just started a site which looks to geolocate archaeological sites – i use the gpress plugin to do this – however, what i would really like to do is to retrieve the geolaction data that is stored in wordpress and use this say to pictures in that area (e.g. those stored on google and flickr) – anyway good idea but not sure where to start….any ideas appreciated.
P
Partrick — Are you referring to geodata stored in WordPress from uploaded images, or post locations?
I don’t really have any idea how to do what you’re proposing, but I would start with looking for how Google shows images in the left-hand column of the maps page. Sometimes it will show images when you search a location, maybe there’s a way to search Google publicly for images by location. I wonder whether those images have to be in Picasa for Google to access the geo data.
I like this plugin alot. The one thing that doesn’t work for me is if I have multiple images I have to post the exif multiple times. Is there a way to make this work with thickbox or maybe Fancybox? I personally use Nextgen Gallery with effects off and then I use the plugin http://wordpress.org/extend/plugins/fancy-box/ for the image effect. Your help would be greatly appreciatd.
Sean — You can use the EXIF as a title attribute as shown in comment 8. If using the WordPress gallery, I know the output can be filtered via PHP and the EXIF could be added to the title attribute that way (the title attribute is used by Fancy box, see the second row in the examples), but I’m not particularly familiar with NextGen, so I don’t know if it has an equivalent filter, or perhaps a setting where you can add PHP or shortcodes to the output.
Sean — Having a closer look at the NextGen plugin page, it has some kind of “template” support; the template may be where you would add the code to display EXIF. NextGen, may have some EXIF stuff built in.
It does have support but only for the imagebrowser template. I use galleries always cause I usually post more than one picture at a time. Not sure other comment is going to work if I don’t post the pictures as html. It looks more like [nggallery id="10"].
Sean — Does the NextGen Gallery provide anything that you want to use that the WordPress galleries don’t? Seems to me you could do the same thing you’re doing on your blog without Next Gen. I would be able to give you an answer as to how to filter the gallery output to include the EXIF (a filter is on the PHP side, so even though you only add a shortcode to your post, you can affect it via the functions file).
Using NextGen, I think the answer is a custom template to use with your gallery, but I can’t find much about how to write them. I’d have to download the plugin and take a look at the templates in there. It’s late, so I won’t do it now, but I’ll try to take a look soon.
I honestly can’t remember why I went to Nextgen. I do like using it and don’t think I can break away from it now anyways. Here is a template site with examples. http://nextgen-gallery.com/templates/. Also there is the fancybox plugin I listed above also if that helps any.
I got it working the way I wanted. You can check it out. It auto imports the meta right into the description.
Sean — Great! How’d you do it?
Added code to the admin/functions.php file. When you import the metadata is now puts it neatly into the image description. So it shows up in the thickbox or any image effect box that has a description field on it. I can send you the file. Its pretty small. Just shootme an email for it.
This plugin rocks it is very easy to use and very cool, thank you kristarella :)
There is a way to change the color of the exif file ? i cant find the right code line to change it…
:)
Sean — Ah, ok. Be sure to keep a backup of the change in case it gets overwritten on upgrades.
Nicola — By default the exif
ulis given a class of “exif”, you can style it in your CSS file with that. Or add you own class on the options page.Any seo advantage to Thesography displaying EXIF data for images uploaded with WordPress. ?
Jim — I’ve never heard of displaying EXIF data having any effect on SEO one way or the other. However, I have a strong belief that if your site makes sense and is useful for users, then that will be reflected in your search engine rankings. So, sticking to web standards in the code is good for users because it makes for better cross-browser compatibility and potentially load speed. Interlinking can be good for users to allow them to find related and relevant content, but too much linking will be bad because it’s overwhelming — likewise, search engines will notice useful linking and too many links will probably make them think you’re just link dumping. If EXIF is relevant to your site — i.e., you’re interested in the art of photography and the technical means by which that art is created, and your viewers are interested in that too — then there’s a chance that search engines will take that into account and will help searchers find you when it’s relevant (e.g., when looking up particular camera gear, or searching for photos with wide apertures etc).
Hello,
I have a problem with this plugin. It always shows “/home/www/web277/html/pics/wp-content/uploads/ is not exists.”
but the folder exists…
example: http://gugux.com/pics/wp-content/uploads/test-exif2-795×529.jpg
what is the problem? thx for helping.
Gugux — Where and when is that message showing? I can’t think of any reason why this plugin would say that.
http://www.garabaghi.com/photos/fiftyfivewest/
for some reason when i add
[exif] to my post it only displays in text as you can see in the link, how do i get the nice boxes and have them display in row ?
Alex — I can’t see the EXIF info in the link, but you need to use CSS in your theme’s stylesheet.
Does this EXIT data plugin work with NEXT Gen Gallery?
Brett — Yes. There’s some discussion about it above (comments in the 70s). You either need to create a template for next gen to include the function, or edit the output of the plugin as Sean did above.
Would it be possible to add an Exposure Bias field to Thesography? I’ve tried to do it myself but failed…
Chris — Yes, it’s possible. It’s in the EXIF spec, so I’ll try to add that in on the next update.
Is there a simple way to reorganize how the data is shown. For instance it currently shows the Aperture first, then camera and so on, I’d like it to order differently, like Copyright name, date, camera, aperture and so on instead. Or is something that I need to hack in the plug-in? Thank you, great job on the plugin, works great.
Justin — Ordering isn’t enabled yet, but it’s on my list. The only way at the moment would be to reorder the list in the plugin file.
Thank you, that is actually what I went in and did and it works great. Awesome job, thanks.
Congrats for this plugin! It works flawlessly on my photoblog. I wonder if:
a) you could include one more field: lens type
b) i wonder if you can make it to display by default the exif of each image in a post, without to manually include the id of every image.
Thanks for your great work!
Mihai
Mihai — Good ideas, I’ll see what I can do!
Hi Kristarella, thanks for creating this plugin. Unfortunately, I couldn’t get it to work on my site, I have done a sample page(http://www.viewfinder.com.sg/photos/feel-it-by-grace-sagaya-201102/) with the exif shortcode and could see the html ()but the exif data doesn’t show. I’m not sure if I’m doing anything wrong, do I need to install php exif module or anything like that on my server?
Laurent — Yes, the PHP EXIF module does need to be installed on your server in order for WordPress to be able to read the EXIF data from the image upon upload. Most servers already have it installed, but since — as you say — the html from the plugin is inserted in the post and the image has EXIF data, but it’s not showing up, the PHP module is the best place to look first.
Awesome, thanks for the tip. I had to reconfigure my PHP with –enable-exif,once that’s done phpinfo() will show an additional exif section. It is also quite easy to change the order of the data from the code(starting from line 357). Thanks again for this wonderful plugin, works perfectly the way I wanted! =)
HI
I want to make my self a site for my photos. I tryed to install your plugin on my test-site but I dont get anything under the photo, please see: http://www.test-test.dk/test-post-1.html
http://www.test-test.dk/wp-content/uploads/Billede-2.png
http://www.test-test.dk/wp-content/uploads/Billede-1.png
Best regards
anders
Never mind for know :-)
Best
anders
Hello
I’ve been using this plug-in to show location data on my blog, great work and very easy to integrate.
I wonder if it would be possible to create cloud tags with certain EXIF data, like: Camera, Focal length, Aperture, Shutter speed, ISO, etc.This kind of tags will look great on the archive page.
Thanks again,
Alberto — What do you mean by cloud tags?
I mean something similar to the sidebar (widgets) categories Tag Clouds but with EXIF data like: “Nikon D7000 Nikon D50 f/11 f/2.2 30mm 18mm …” with different font sizes depending on how many photos meets the criteria, like a kind of auto-tags based on the EXIF data.
By example the short code
[exif-tag show="camera, aperture, focal"]
It would be a nice way to category and filter photos. And even with the EXIF lens id.
Alberto — I see what you mean. It may be possible; I’ll have to have a think about the best way to do it without putting too much load on the database. If this were implemented would you want it to link to the image/attachement page, or to the post that those images are attached to?
It was just a thought, that it would be nice to “auto-exit-tags” with uploaded photos. It implemented I prefer to link to the list of post that meet the tag criteria, If the user click on “Nikon D7000″ it would be great if we can have a page listing all the photos taken with this camera.
Is it possible to show the exif data for an image in it’s title?
I’m using fancybox, which shows the image title in a nice field under the opened image.
sry, didn’t read the comments :D
excuse my foolishness
great plugin btw
Does this work with PNG?
Tobias — Apparently PNG doesn’t support EXIF, so no.
Great plug-in for photography blog! But hardly found on wordpress.org plug-ins page by term “EXIF”.
My question is, is it possible to include option to display EXIF of “featured image”?
How can I modify it to capture featured image url automatically?
Thank you very much, the greatest EXIF display tool I had found so far. =)
I’d inserted
$imgID = get_post_thumbnail_id($post->ID);
at “thesography.php” line 318 and successfully extracted featured image =)
However, I’m stuck on appending the EXIF into post without shortcode (I’m using different theme). May you advice where can I modify? Thanks
Daz — The instructions for adding the function to your theme is above. I’ll be adding options to add it automatically in other themes with the next update… when I get around to that.
Any ideas why it would suddenly stop working in a text widget.
Adding the shortcode to the post content itself works. Strange, totally puzzled because it was all working fine yesterday.
Tess — Generally shortcodes don’t work in text widgets unless you add some extra code to your theme to get them to.
Really odd, it was working fine yesterday :(
Didn’t specifically change anything on my theme too
Tess — If you need more help with it can you please give me the URL where you’re having the problem?
Hello again,
what about a manual option to manually export/create a KML file with info about all geolocated posts?
Thanks in advance.
Alberto — What would you use that for? What post info would it contain? Would the info be about the posts or the photos? Technically in WordPress the geo data is associated with the photos and there is actually a separate feature where you can tag posts with the location that you’re posting from… so there might be a bit of confusion or crossover where someone was using that feature.
Hello,
I’d like to know if the plugin is compatible with Wordpress 3.1.3
Thanks!
Eddy — Yes, I’m using it on my sites and it’s working fine.
Great to know!
I just want to have a map with all the photos (or category or tag) of my blog. For each photo I would like to have: a pointer (or thumbnail), the title and a link to the post.
Thanks in advance.
Alberto — A KML file probably wouldn’t be the most efficient solution since you’d have to re-export it. If the map is displayed on the blog it’s probably possible to write a custom loop to do that; I would have to check the maps API though.
Please, Please, Please,
Help me integrate THESOGRAPHY into my blog. I am running a clean version of theme Twenty Eleven 1.2. I see the Add EXIF To Post option on the create post pages, but when the boxes are checked they the EXIF does not appear below the image, nor anywhere on the page. I geo-tag all my images and the EXIF is intact while uploading using WP. All of my images are stored in the Media Library, and you may pull one dow to see the EXIF info. I would like the EXIF display to be automatic. I can of course see the EXIF in a post if I use the exif show=aperture,location,shutter in the post, so I know the EXIF info is maintained during uploading and posting.
I have tried varios versions of the code/PHP placed in the functions, image, media, and so on file, but to no avail.
Exactly which code should I place to automate the EXIF display with the Lat and Lon geodata? Whit file do I place it in? I have so many variations, I am confused. I am not a programmer, so please dumb it down for me.
Kind regards,
Johnny Kurtz
johnnykurtz.com/blog
I forgot to mention, I think THESOGRAPHY is the nicest implementation of an EXIF extractor, truly.
Aslo, as a follow up. It would be super if I could email the appropriate PHP file, and if some kind hearted person could implant the correct code into that file. I am a photographer, a code scares me.
Kind regards,
Johnny Kurtz
johnnykurtz.com/blog
Johnny — At the moment the auto-insert when you check the boxes is only for the Thesis theme (mainly because of my working knowledge at the time of writing the plugin and because I use Thesis), but the next update will include auto-insert for all themes (whenever I finally get around to updating it!). In the mean time, I think what you need to do in your theme is edit the loop-single.php file and add:
<?php echo display_exif('location'); ?>to where you want it to display (the entry content etc is reasonably well marked in the file).Hi Kristarella,
A long time since I was here – which of course means I’ve been running the plugin for a long time without any problems. There are still no better plugin!
I just updated Woo Themes Apertue from 1.3.8 to 2.6 – a leap! On the top of my site there is a slider, which under normal circumstances will automatically slideshow the 9 latest posts.
Now this no longer works, and it’s due to the code I got from you regarding the javascript hovering-display of exif – in functions.php.
The slider works swell immediately after I take out this code.
I also see that the green bullets are interfering with the Like, G+ and Tweet in posts.
I guess it’s time for an update of this code :-)
I don’t want to put the code in the post – it’s too much, so please let me know where you want me to send it.
Regards
Morten Ross
Hello Kristarella,
Thank you for creating this plugin. I use it in a theme in production and construction.
I do not use shortcodes, but directly the function to display the Exif.
Until the WP version 3.1.4 it worked fine. But now it seems to conflict with several things. I do not know if it’s because of Wordpress 3.2, or if it is because of the update of the theme. The theme is, unwanted “Envisionned” eleganttheme home. I think the problem will be the same for all of their themes. It goes as follows:
with each new publication of an article, the Exif jump and several pings are generated. The settings page templates also jump (attributes of the page). This happens several times until it starts the process several times, then it works. But the first publication made ??every jump.
If you can help me and if you want me to send the premium theme for analyzing what’s going on, give me a mail I will send.
Thank you in advance for your help
I uploaded the “.pot” file in language directory and “.ttf” file in font directory ,it works well.
But the two files lost after I used NextGEN Gallery automatic update.
Is there any method to avoid this problem?
Could you help me?
Thanks!
Plugins should not affect files in other plugins folders. If they are, it is a fault with the first plugin, rather than the second.
Hey,
Thanks for this plug-in. I would really like to use it but i’m not succeeding.
I’m using NExtgen Gallery and with this code i try to add the EXIF, but it doesn’t work
http://www.digitaldude.nl/wordpress/wp-content/gallery/city-culture/_DSC6212_bewerkt-2.jpg
What am I doing wrong?
sorry for the double posting; I’m using this code:
<ul class="exif">
<li>
http://www.digitaldude.nl/wordpress/wp-content/gallery/city-culture/_DSC6212_bewerkt-2.jpg
</li>
</ul>
What am I doing wrong?
Digitaldude— I haven’t really used NextGen, so I don’t know how it changes the image handling of WordPress, but my guess would be that it changes it a lot. NextGen has its own EXIF handling, so you might need to ask them for help.
Holy crap. You are amazing. I spent hours searching and searching, and gave up. Started writing my own “plugin,” and it wasn’t until I was searching for some wordpress reference codes for EXIF data that I stumbled on this.
This does exactly what I’ve always wanted, and it’s so mind numbingly simple. I can’t believe how low of a rating it’s got on the wordpress plugins, it deserves 6/5 stars, if it were possible. Kristarella, you’ve made me very happy today.
Hi, Any news on when an update to your wonderful plugin might be available?
Chris
Hello Kristarella
I use your plugin for 10 months in a template made by myself and also on twenty ten. Now Exifs doesn’t display anymore. Except for ONE post. Only one. This is very strange. Since Wordpress 3.2 there are bugs. And since WP 3.3.1 everything doesn’t work anymore.
Please, update your plugin
Thanks a lot
Again me, I forgot the code. This is the code inside single.php after the content
ID, ‘_use_exif’, true);
echo display_exif($exif_options);
add_geo_exif;
}
else { ?>
Chamomor — can you try pasting the code again? You might need to encode it (link below the comment box).
I’m using Thesography on my photoblogs with the latest WordPress and it’s fine, so not sure what might be going on for you.
Working perfectly for me as well. I only use the [exif id="1234"] shortcode though, not the auto tag function; i usually post my photos in droves.
Hi Kristarella, thank You for your answer
This is my regular code, inside single.php after the_content :
<?php if(function_exists(‘display_exif’)) {
$exif_options = get_post_meta($post->ID, ‘_use_exif’, true);
echo display_exif($exif_options);
add_geo_exif;
}
else { ?>
<?php } ?>
Chamomor — Is the code within the loop? And what is
add_geo_exif;? It isn’t in proper PHP format. If it’s supposed to be a call to a function it should have parentheses after it, and if it’s to add the geo exif to the database on image import, it’s not necessary, the plugin already does that.Still nothing that can replace your pluging for my, and now I have more than 700 posts/images displaying displaying EXIF.
There is one piece of info that I find I cannot live without any longer, and that is the “Taken” – it only displays the date, but so many images have a very interesting time as well – e.g. 04:30 in the morning. This time stamp will help me in recalling why the image is so dark, or why I used such high ISO setting. Now I have to open the image in an editor or in Windows Explorer to find this out, and that is cumbersome.
What I can see it’s this line that needs an upgrade:
// Creation time
if ((strpos($option, â??timeâ??) !== false || $option == â??allâ??) && !empty($imgmeta['image_meta']['created_timestamp']))
$exif_list .= $before_item . "Taken" . $sep . date(â??j F, Yâ??,$imgmeta['image_meta']['created_timestamp']) . $after_item;
Thanks for your help,
Morten
Hmm – the Encode it is great at messing up, and I cannot edit my post, so here goes raw php :
if ((strpos($option, ‘time’) !== false || $option == ‘all’) && !empty($imgmeta['image_meta']['created_timestamp']))
$exif_list .= $before_item . “Taken” . $sep . date(‘j F, Y’,$imgmeta['image_meta']['created_timestamp']) . $after_item;
Morten
Morten — Sorry for the delay, I’m going to put this in the next update for you, but since that is taking me a while to finish (I’m doing a biggish rewrite), change
date('j F, Y'todate('j F, Y H:i'and that will add the time in 24 hour time. You can check the PHP manual to find the letter codes to represent the date and time the way you want to.Make sure you edit the file in a plain text editor (rich text might be why the encoding messed up, and would break your site if you edit PHP in a rich text editor).
Silly me – I didn’t think of that :-)
‘r’ does all I need.
But now I see there is a text wrap, so it will be written on two lines instead of one.
How to disable text wrap?
Morten
Never mind – I managed to avoid wrapping with ‘d m Y H:i:s’
Hmm – I realize I need ‘F” – textual representation of month it instead of just number, as USA readers will be confused as they will think in month first, then day.
This will get wrapping issues with long months like November, so I need to increase the wrapping limit, after all – so how do I do it?
Morten — You could use “M” for a three letter version of the month, but if you don’t want to you just need to increase the width of ul.exif in your CSS file.
Many thanks :-)
One final question:
For quite some time I’ve wanted to be able to display exif info on all photos in a post – not just the first posted as is the case now.
Will this be possible in your update?
Morten — Most likely yes, although I’m still figuring out the best way to do that.
Hallo,
I’m using the deepfocus template from eleganttheme on wp3.3.
I installed the plugin but I can see any exif information in the post. Can I use the plugin with this template and Wp version?
Ron — Have you visited the settings page and read the instructions above?
Hello,
Has anyone been able to figure out how to modify the Location so that instead of raw Latitude and Longitude codes, it changes them to say the location in terms of City, State, Country? For example, “New York City, NY”, or something of the like?
Thanks for the great plugin! :)
Hello
Thanks for your answer, buut something is not normal about what you said, contrary of an other comment. So can you just give me the complete and normal code for insertion into a single.php file ? Please ?
Thanks
Hello again,
Looking to see if you can help with this one. I found a Yahoo API called PlaceFinder which can reverse geocode Latitude and Longitude into City/State/Country, and a whole lot more. Since Thesography is able to define latitude and longitude (using $neg_lat . number_format($lat,6) . ‘+’ . $neg_lng . number_format($lng, 6) ), it’s an easy fit to make the Yahoo API work. Simply by going to http://where.yahooapis.com/geocode?q=‘ . $neg_lat . number_format($lat,6) . ‘+’ . $neg_lng . number_format($lng, 6) . ‘&gflags=R.
However I am having a hard time getting that XML data back into Thesography.
So, I’ve found this function using PHP and SimpleXML that parses the XML return data from the Yahoo API. http://snipt.net/pkarl/parse-yahoo-weather-feeds-with-simplexml-php
I’ve done a bit of reverse engineering to try and change it to parse the same data for Yahoo’s PlaceFinder API for city, state and countrycode. I’m able to get it to grab the link, but I can’t get it to play nicely with Thesography. My edits seem to crash the plugin pretty hard, with a bunch of “Node no longer exists” errors :(
Here’s a sample URL from Yahoo’s PlaceFinder API: http://where.yahooapis.com/geocode?q=40.754500+-73.978833&gflags=R – The sections I’m most concerned about are the and (New York City, NY, US).
I’m hoping you’d be able to take a quick stab at it? I’m sure you could decipher it in a matter of minutes (rather than hours like I’ve already invested into it). I’m not looking for a full fledged plugin update, just a quick snippet I can place in at around line 351 (or so).
Your help is much appreciated! Many thanks!
Hi, my request in comment #150 is all set. :)
Chamo — Not normal? I try to help people learn what they’re doing by explaining the issue to them, rather than just pasting the answer because most people don’t learn anything that way. I don’t think I’ve contradicted myself anywhere. I meant your code should look more like:
<?php if(function_exists('display_exif')) { $exif_options = get_post_meta($post->ID, '_use_exif', true); echo display_exif($exif_options); } ?>Pat — Great work!
All, I’ve been holding off on an update due to some larger changes and rewrites, but I will do a smaller update soon including Pat’s code and Morten’s.
Hi Kristarella.
I have to admit that I am totally useless at this code stuff. I have installed your plugin, but it seems not to work, so I added this to the end of my post text [exif show="aperture,shutter,focus,iso"] and it shows up OK.
Could you possibly tell me how I can get this to show up on each page so I don’t have to add a shortcode to every post?
Bless you.
Michael.