I need to know the most efficient method to grab 3 pieces of data from from multiple posts:

  • Post title
  • Thumbnail
  • Custom Field

I am attempting to build a Google map of posts using data stored in WP posts. Each post has geo coordinates and a thumbnail. I want to pull the title, geo custom field and thumbnail and use this data to build points of interest on a map. The posts are stored as a custom post type called listings.

Here is a demo: http://www.barbadospropertylist.com/map/

Here is my query code:

$args=array( 'showposts' => 45 );
query_posts( $args );

Currently this is failing to query anymore than 45 posts. I have over 400 listings that I would like to query. Not sure why it's failing.

1 Answer 1


Sorry! Turns out the problem with query_posts failing here was due to my PHP memory_limit. I changed it from 8mb to 128mb and the problem goes away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.