Hi,
It is an array when the custom field has multiple values, for instance a checkbox field.
Thanks,


Enviado pelo meu aparelho BlackBerry®

-----Original Message-----
From: Boston Dell-Vandenberg <notifications@github.com>
Date: Sun, 15 Sep 2013 09:06:33 
To: bostondv/ultimate-posts-widget<ultimate-posts-widget@noreply.github.com>
Reply-To: bostondv/ultimate-posts-widget <reply@reply.github.com>
Cc: Renato Murasaki<renato.murasaki@gmail.com>
Subject: Re: [ultimate-posts-widget] New feature proposal - show custom field
 values using UPW (#8)

> @@ -177,6 +180,29 @@ function get_image_path($src) {
>  									</a>
>  								</p>
>  							<?php endif; ?>
> +							
> +							<?php if ( $instance['custom_field'] ) {
> +							//Display the values of custom fields, according to the comma-separated list of field names 
> +								$custom_field_name = explode(",", $instance['custom_field']);
> +								foreach ($custom_field_name as $name) { 
> +									$name = trim($name);
> +									$custom_field_values = get_post_meta($post->ID, $name, true);
> +									if ($custom_field_values) { ?>
> +										<p class="post-<?php echo "$name" ?>">	
> +										<?php if (!is_array($custom_field_values)) {
> +											echo $custom_field_values;
> +										} else {

What situation is a custom field an array that we would want to loop through?

---
Reply to this email directly or view it on GitHub:
https://github.com/bostondv/ultimate-posts-widget/pull/8/files#r6367231