I've been given some code to tidy up and edit a bit and the client wants to organize a custom post type named "plans" alphabetically.
It's not a straight forward query and I've never come across anything like this before, any ideas?
<?php $planIDs = get_post_meta($post->ID, '_lm_comm_plans', false); ?>
<?php foreach ($planIDs as $planID) : ?>
<?php $pdfID = get_post_meta($planID, '_lm_plan_pdf', true); ?>
<?php $pdfURL = wp_get_attachment_url($pdfID); ?>
<?php $planTitle = get_the_title($planID); ?>
<li class="plan"><!-- content here --></li>
<?php endforeach; ?>

$planIDscome from? – Milo Jan 6 '12 at 19:40