WordPress.org

Forums

Displaying a custom array of posts (1 post)

  1. bimmershops
    Member
    Posted 9 years ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags