Return to Snippet

Revision: 59785
at October 1, 2012 19:27 by shin


Initial Code
<?php

				$all_meta = get_post_custom($ID);
				if ( $all_meta )
					foreach ( $all_meta as $key => $val )
					{
						if ( strpos($key, '_') === 0 ) continue;
						echo '<div class="specification"><span><strong>' . get_label ($key) . '</strong>: ';
						foreach ( $val as $val_key => $val_val ) echo $val_val . ' ';
						echo '</span></div>';
					}
				?>

Initial URL


Initial Description
it's important for cyrilic (key name must not contain non-english symbols) or for show key names with spaces. and this code not show empty fields or fields with "_name". this is not my code, i only add get_label here.

Initial Title
magic fields: show all fields with LABELS, not key name.

Initial Tags


Initial Language
PHP