get all post based on custom field wordpress code example
Example: how to get all post fields in wordpress
echo '<pre>';
print_r(get_post_custom($post_id));
echo '</pre>';
echo '<pre>';
print_r(get_post_custom($post_id));
echo '</pre>';