oeco / jeo

A WordPress parent theme for interactive maps and journalism
http://jeowp.org/
Other
90 stars 33 forks source link

how to load featured image in bubble-marker? #51

Closed doutorsocrates closed 10 years ago

doutorsocrates commented 10 years ago

I try to insert content-marker-bubble.php with: the_post_thumbnail(); but it does not recognize. Is there another solution?

miguelpeixe commented 10 years ago

It's supposed to work. Can you paste all the code on content-marker-bubble.php?

As you can see in this child theme, the marker bubble content have a thumbnail and its working

UPDATE What you might be experiecing is cache delay. If you add random content to the content marker bubble, does it immediately appers?

doutorsocrates commented 10 years ago

<?php /*

miguelpeixe commented 10 years ago

The code looks ok.

The post bubble content is stored in it's GeoJSON cache. Have you tried clearing the GeoJSON cache on the admin bar and clearing your browser's cache after updating this code?

doutorsocrates commented 10 years ago

bingo. I had to clear the cache for 3 or 4 times and it worked.

thanks very much

miguelpeixe commented 10 years ago

You don't need to purge this cache 3 or 4 times. It might be the combination of caching features that had you struggle on this. Since the markers request can get pretty big there's also a transient cache that stores every marker request for 10 minutes. This cache can be disabled by adding this code to your functions.php:

function my_markers_enable_transient() {
  return false;
}
add_filter('jeo_markers_enable_transient', 'my_markers_enable_transient');