I've used this code to show custom fields if they're filled in a post using Custom Field Suite Plugin
<?php if($cfs->get('whatliked')){?>
<?php echo $cfs->get('whatliked'); ?>
<?php }?>
Now I need to have the same check for some custom profile fields I've added through functions.php
/* BEGIN Custom User Contact Info */
function extra_contact_info($contactmethods) {
unset($contactmethods['aim']);
unset($contactmethods['yim']);
unset($contactmethods['jabber']);
$contactmethods['facebook'] = 'Facebook';
$contactmethods['twitter'] = 'Twitter';
$contactmethods['google+'] = 'Google+';
$contactmethods['linkedin'] = 'LinkedIn';
return $contactmethods;
}
add_filter('user_contactmethods', 'extra_contact_info');
/* END Custom User Contact Info */
What is the code I need to add to my author.php to check if the facebook field has been filled and if "yes" then show and if "no" then hide...
P.s. Is there a way to post the code with linebreaks already in???
{}) See: wordpress.stackexchange.com/editing-help – s_ha_dum Mar 15 at 21:57