I’m trying to print a custom field for a category but with no success.
This is my code:
$args = array(
'taxonomy' => 'gb_category',
'orderby' => 'name',
'style' => 'list',
'hide_empty' => 0,
);
$categories = get_categories($args);
$i = 1;
foreach ($categories as $cat) {
the_field('category_custom_field');
}
Solved.
If you need custom filed for category then you call with following code:
and if you have custom category type then you call with this code: