---
title: "Frequently Asked Questions - Advanced Custom Fields"
description: "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"
url: "https://www.tassos.gr/docs/advanced-custom-fields/start/frequently-asked-questions"
date: "2026-04-06T12:06:03+00:00"
language: "en-GB"
---

[ Home ](https://www.tassos.gr/index.php?option=com_content&view=category&layout=blog&id=24&Itemid=1088) / [ Advanced Custom Fields ](https://www.tassos.gr/index.php?option=com_content&view=category&id=44) / [ Getting Started ](https://www.tassos.gr/index.php?option=com_content&view=category&id=63)

#  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?](#load_field_programmatically)

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

## Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://www.tassos.gr"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Home",
            "item": "https://www.tassos.gr/docs"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Advanced Custom Fields",
            "item": "https://www.tassos.gr/docs/advanced-custom-fields"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Getting Started",
            "item": "https://www.tassos.gr/docs/advanced-custom-fields/start"
        },
        {
            "@type": "ListItem",
            "position": 5,
            "name": "Frequently Asked Questions",
            "item": "https://www.tassos.gr/docs/advanced-custom-fields/start/frequently-asked-questions"
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@type": "Article",
    "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://www.tassos.gr/docs/advanced-custom-fields/start/frequently-asked-questions"
    },
    "headline": "Frequently Asked Questions",
    "image": {
        "@type": "ImageObject",
        "url": "https://www.tassos.gr/"
    },
    "publisher": {
        "@type": "Organization",
        "name": "Tassos",
        "logo": {
            "@type": "ImageObject",
            "url": "https://www.tassos.gr/https://www.tassos.gr/media/brand/logo-text.png"
        }
    },
    "author": {
        "@type": "Person",
        "name": "Sotiris Katsaniotis",
        "url": "https://www.tassos.gr/docs/advanced-custom-fields/start/frequently-asked-questions"
    },
    "datePublished": "2017-10-07T20:55:24+03:00",
    "dateCreated": "2017-10-07T20:55:24+03:00",
    "dateModified": "2025-06-12T08:48:27+03:00"
}
```
