Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.