I'm querying a custom field of users based on a city they are in. I am able to display their profile photo and display name, however I can't seem to get the link to their actual author url to work.
It just keeps linking to the same page it's currently on. Any help would be greatly appreciated.
<?php
$london_args = array(
'meta_value' => 'London',
);
// The Query
$london_user_query = new WP_User_Query( $london_args );
// User Loop
if ( ! empty( $london_user_query->results ) ) {
foreach ( $london_user_query->results as $user ) {
?>
<li>
<?php if($user->user_cover_pic == '') { ?>
Photo coming soon
<?php } else { ?>
<a href="<?php $user->url; ?>">
<img src="<?php echo $user->user_cover_pic; ?>" alt="<?php echo $user->display_name; ?>">
</a>
<?php }; ?><br>
<a href="<?php $user->url; ?>"><?php echo $user->display_name; ?></a>
</li>
<?php
}
} else {
echo 'No Lawyers found in London.';
} ?>