Custom Fields (echo within an echo): Syntax help needed!
-
Hi, could someone correct the code below? I’m trying to use an if/then statement to display content based on whether the specific custom field value exists. I’ve gotten it to work, but I can’t get the get_post_meta info to echo within the link:
<?php $facebook = get_post_custom_values("FB"); if ($facebook == '') { echo '<li id="facebook">','<a href="',get_post_meta($post->ID, FB, true),'" target="_blank">','Facebook','</a>','</li>'; } else { } ?>
Any help would be greatly appreciated!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Custom Fields (echo within an echo): Syntax help needed!’ is closed to new replies.