WordPress.org

Support

Support » Plugins and Hacks » Displaying a custom array of posts

Displaying a custom array of posts

  • A little background on what I’m looking to do:
    I have a WordPress installation at bimmershops.com (if you poke around, only Georgia has entries at the moment) and each post has lat/long coordinates assigned to it based on the address. These coordinates are stored in a custom field. I want to allow users to input their own address and find the locations closest to them.

    Where I am now:
    I can generate the distances and use query_posts to iterate through all the posts in the database to build a table of post_ids and distances. From there, I build an array of, say, 10 post_id’s that represent the 10 closest locations.

    And, the question…
    How do I feed this array of post_ids into the loop and display only those posts?

  • The topic ‘Displaying a custom array of posts’ is closed to new replies.