Links to the end result are generally not useful in diagnosing PHP: it’s more helpful to see the PHP code that was used to generate the HTML.
Output filters are available only as a convenience, and there’s no requirement that you use them. I’m not sure how your SQL query looks, but the most “correct” solution (from a data-normalization standpoint), is to select the name as the visible option and the post ID as the stored value (because the ID never changes). Then the task is to convert the stored ID to whatever data it is you wish to display (e.g. the post_title, the permalink, the thumbnail etc). Once you’re sure you’re storing the post ID, then the crux of the problem is “how do I convert a post ID into the data represented by that post?” Variations on that question come up so often that I’ve devoted several of the FAQ’s to them: https://code.google.com/p/wordpress-custom-content-type-manager/wiki/FAQ
Relatedly, a custom SQL query may not be necessary if you define your field as a relation field: it provides a GUI for you to specify criteria for searching the posts table specifically.
Hope that helps.
FPS, thanks for the reply…been reading the FAQ’s and followed everything to the bit..my sql is the same as the example form the FAQ
here’s the sql how i generated the dropdown for custom field school in custom type professor
SELECT post_title, ID
FROM [+table_prefix+]posts
WHERE post_type='school'
now here’s how presented it on the single-professor.php
<td valign="top">
School : <strong><?php print_custom_field('schools'); ?></strong><br />
Department/College : <strong><?php print_custom_field('department'); ?></strong><br /><br />
how can I make the school to show as a link to its corresponding page?
thanks a lot really appreciate your help..
FPS thanks for pointing me to the right direction!! Plugin is really great! this really opens up a lot of possibilities for wordpress!!
many thanks!