-
- ACF Module Loader - Display any module as Field in Joomla
- Address Autocomplete
- Articles
- Chained Fields
- Convert Forms Field
- Countdown Timer
- Country
- Currency
- Download Button
- FAQ
- File Upload
- Gallery
- Gravatar
- HTML5 Audio
- IFrame
- Map
- PayPal Button
- PHP
- Progress Bar
- QR Code
- SoundCloud
- Telephone
- Timepicker Field
- True/False Field
- URL
- Video
Frequently Asked Questions
Here's a list of the most frequently asked questions about the Advanced Custom Fields extension
How to load an article's custom fields with PHP?
To get the article's custom fields programmatically with PHP, use the code below:
$article_id = 5; // Enter your article ID here
$model = JModelLegacy::getInstance('Article', 'ContentModel');
$article = $model->getItem($article_id);
JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');
$fields = FieldsHelper::getFields('com_content.article', $article, true);
The $fields variables is an Array of Objects, and you can loop through it like in the example below:
foreach ($fields as $key => $field)
{
echo $field->title . ' = ' . $field->rawvalue;
}
Last updated on Jun 12th 2025 08:06