This worked perfectly in a previous version of wordpress, different site tho. I have a custom field called flash on several wp pages but it keeps defaulting to "printed if results are empty". Any ideas on why this wouldn't work?
<?php
if ( function_exists('get_post_custom_values') )
{
$mykey_values = get_post_custom_values('flash');
if(count($mykey_values) > 0)
{
foreach ( $mykey_values as $key => $value )
{
echo "$value";
}
}
else
{
//printed if results are empty
echo("mainPage.swf");
}
}
else
{
//printed if function doesn't exist
echo("mainPage.swf");
}
?>