Display list of post custom fields.

Defined filters

  • the_meta_key
    apply_filters('the_meta_key', "<li><span class='post-meta-key'>$key:</span> $value</li>\n", $key, $value)

Source code

function the_meta() {

	if ( $keys = get_post_custom_keys() ) {

		echo "<ul class='post-meta'>\n";

		foreach ( (array) $keys as $key ) {

			$keyt = trim($key);

			if ( is_protected_meta( $keyt, 'post' ) )


			$values = array_map('trim', get_post_custom_values($key));

			$value = implode($values,', ');

			echo apply_filters('the_meta_key', "<li><span class='post-meta-key'>$key:</span> $value</li>\n", $key, $value);


		echo "</ul>\n";





No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: