Custom Fields If Statement
-
Hey forum,
I’m trying to get a statement to check if a custom field exists and if it does, output some code.
I’m pretty sure the if statement is working properly, but the variable to get the path is improperly coded.
Am I correct with this? Does anyone see the issue?
Thanks!
–nks
<?php $key = 'side-bar-video'; $themeta = get_post_meta($post->ID, $key, TRUE); $path1 = TEMPLATEPATH . "/media/videos/" ; if($themeta != '') { echo ' [kml_flashembed movie="' . $path1 . $themeta . '" width="313" height="250"] [/kml_flashembed] '; } ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Custom Fields If Statement’ is closed to new replies.