pablocattaneo
2/3/2016 - 4:28 PM

Devuelve todos los custom field que tengan la misma Key. Return all custom fielnd with same key value.

Devuelve todos los custom field que tengan la misma Key. Return all custom fielnd with same key value.

<?php 
	$listItem="keyName"; // EL nombre del custom field tal como está en adminstrador ejemplo: canción
		$listItem = get_post_meta($post->ID, $listItem, false); // La propiedad false convierte la respuesta en array
		foreach ($listItem as &$valor) {
		    echo $valor . "<br/>";
		}
?>