MichDe / wordpress-geo-mashup

Automatically exported from code.google.com/p/wordpress-geo-mashup
1 stars 0 forks source link

Location info tag doesn't work in a WP_Query loop #621

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A call to the location_info tag won't find the correct location for a post in a 
loop created using WP_Query(), and so displays nothing.

Original issue reported on code.google.com by dylankk...@gmail.com on 28 Jan 2013 at 11:52

GoogleCodeExporter commented 9 years ago
This issue was updated by revision r1215.

This tag and the show_on_map_link tag don't have quite enough information
available when used in secondary loops (such as those using WP_Query) to know
which kind of object to look up location for (post, user, comment, etc). 

They now look up locations for each object type if needed, and use the first
result. 

You can ensure a correct result by passing the object_name parameter to the
tag, or even object_name and object_id.

Original comment by dylankk...@gmail.com on 29 Jan 2013 at 2:39

GoogleCodeExporter commented 9 years ago

Original comment by dylankk...@gmail.com on 2 May 2013 at 4:25