Hi!
Im wondering if there's a way to sort custom fields after the way you put them in (meta_id) and not randomly? Im using a function to write out a menu with weekdays, and it's not very good to have fridag in front of monday..
<?php if ( $keys = get_post_custom_keys() ) {
foreach ( (array) $keys as $key ) {
$keyt = trim($key);
if ( '_' == $keyt{0} || 'cycle' == $keyt || 'pdf' == $keyt || 'youtube' == $keyt || 'underrubrik' == $keyt )
continue;
$values = array_map('trim', get_post_custom_values($key));
$value = implode($values,', ');
echo apply_filters('the_meta_key', "
<div class='row'><div class='left'>$key</div><div class='right'>$value</div><!-- /right --></div><!-- /row -->
", $key, $value);
}} ?>
Thats the code im using. If there would be a way to sort them after meta_id, or choose which order to put them that would be great. Thanks a lot in advance!