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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)