get_field not displaying my custom field value

Nevermind, I figured this out.

The id needs to be “category_” and then the ID.

So the code is:

$sub_heading = get_field("sub_heading", "category_" . $cat->term_id);

Leave a Comment