I have created some custom fields in user profile from backend
templates/name-template/html/com_content/article/default.php
and use this code for load custom fields at joomla article
<?php
$context = 'com_content.article';
$article = $this->item;
//use the field helper class to get the fields
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
$fields = FieldsHelper::getFields($context, $article, true);
// Added so as to access fields by their name
// GET CUSTOM FIELDS
foreach($fields as $field) {
$fields[$field->name] = $field;
}
?>
and use this code for fetch
<?php echo ($fields['name-field']->value); ?>
i creat textarea fileds at user profile for write about me (author) now I want to fetch users custom fields (author) in joomla article How can i do it ؟