• Resolved mremonen

    (@mremonen)


    Hi and sorry to ask this question, which seems to be the most popular here.

    Anyway, the EXIF-data is not populated to image title in articles (blog posts). It is available, because it can be displayed using short codes. AND it is shown in blogroll.

    The test post can be found here: https://www.remonen.fi/uncategorized/testing-testing-testing/

    And the blogroll is: https://www.remonen.fi/blogi/

    Now if you hover the cursor over the image in blogroll, the EXIF is shown quite nicely. But not so with the articles. For some reason the “Title” does not get populated using your function in the articles.

    I am not in very deep in WP but still managed to edit the functions.php…

    Regards,
    Matti Remonen

    https://www.ads-software.com/plugins/thesography/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author kristarella

    (@kristarella)

    Are you putting the shortcode in the title attribute on single posts?

    As far as I can see there is no title attribute on your images in single posts. You would need to add title=”[exif id=’ID’]” to the HTML of the image in single posts.

    Thread Starter mremonen

    (@mremonen)

    Ok. First of all: I was under impression that adding the function into the “functions.php” would automatically add the EXIF-data into all images, not just to those I would later select. Why does it work with the images in the blogroll?

    Anyway, the problem looks more difficult: I added the shortcode into the image title, but it is still not shown. Somewhere during the publish/render-process the “title” is emptied.

    Here’s how the last image data looks in edit:

    <a href="https://www.remonen.fi/WP/wp-content/uploads/2014/01/kirja-arvostelu_bw-4.jpg"><img class="alignnone size-full wp-image-3534" title="[exif id=&quot;3537&quot;]" alt="kirja-arvostelu_bw-4" src="https://www.remonen.fi/WP/wp-content/uploads/2014/01/kirja-arvostelu_bw-4.jpg" width="645" height="800" /></a>

    And here’s how it looks after publish:
    <p><a href="https://www.remonen.fi/WP/wp-content/uploads/2014/01/kirja-arvostelu_bw-4.jpg"><img class="alignnone size-full wp-image-3534" title="" alt="kirja-arvostelu_bw-4" src="https://www.remonen.fi/WP/wp-content/uploads/2014/01/kirja-arvostelu_bw-4.jpg" width="645" height="800" /></a></p>
    Regards,
    Matti Remonen

    Plugin Author kristarella

    (@kristarella)

    Please provide more information about which function you have added and where. I can’t tell from looking at the HTML of your site what is happening in the PHP.

    From your site and what you’ve said it sounds like you have added the EXIF to the title attribute of your featured images via functions.php, which would be why it shows up on the blog page and not the single post pages.

    Try title="[exif id='3537' show='all']"
    It looks like there might be a bug that you need to specify the fields to show. I’ll fix that in the next version.

    Thread Starter mremonen

    (@mremonen)

    Ok, thanks. Now it works (you can check using the last image).

    I suppose I can live with this (specifying the tag manually) but I would prefer the “automatic”-approach. Also it looks like that the plugin does not honor the “Add EXIF to post”-settings, as you suspected.

    The functions I was referring to are the “Add EXIF to WP Gallery image” and the sorting function. To be honest, I’m not that familiar with WP internals so I thought that the function (Add EXIF..) would affect all images regardless of their position.

    Regards,
    Matti Remonen

    Plugin Author kristarella

    (@kristarella)

    The exif can only be added programmatically (via PHP) to images that are automatically generated by WordPress (like in the gallery shortcode, and the featured images). I haven’t found a reasonable way to do it with images inserted into content yet.

    The tutorial you got that code for the WP Gallery is specifically referring to the wordpress [gallery] shortcode.

    The shortcode will pickup the “show” settings from the settings page and “Add EXIF to post” options properly from the next version of the plugin.
    Apart from using the shortcode, and adding the display_exif function in single.php, the “Add EXIF to post” options will only show anything if the automatic insert option is turned on in the main settings, but then it will only show the EXIF for the first photo and it will display at the end of the post.

    Thread Starter mremonen

    (@mremonen)

    Ok, thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘EXIF data not shown on articles’ is closed to new replies.