How to display user on listing card e.g.

mceclip0.png

You can use the code below to add user name and user image to listing cards php files

e.g. \wp-content\themes\vehica\templates\card\car\card_v3.php

 

<?php
$vehicaUser = $vehicaCurrentCar->getUser();
$vehicaUserName = $vehicaUser->getName();
$vehicaUserUrl = $vehicaUser->getUrl();
$vehicaUserImageUrl = $vehicaUser->getImageUrl();
?>

<div style="margin: 10px 0">
<?php if (!empty($vehicaUserImageUrl)) : ?>
<a href="<?php echo esc_url($vehicaUserUrl); ?>"><img style="width:30px; border-radius:50%; margin-right:6px" src="<?php echo esc_url($vehicaUserImageUrl); ?>" alt=""></a>
<?php endif; ?>
<a href="<?php echo esc_url($vehicaUserUrl); ?>"><?php echo esc_html($vehicaUserName); ?></a>
</div>

 

You can add this code e.g. here:

mceclip1.png

 

Please add it via Child Theme. You can learn more how to use it here:

https://tangiblewp.freshdesk.com/support/solutions/articles/101000373821-how-to-use-child-theme-how-to-change-files-php-css-js-and-keep-theme-future-update-compatibili