WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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