Home Forums General Issues get_field – functions.php


get_field – functions.php

  • I feel like I’m doing something really daft, using the following code on the front end I can output a value within the ‘test’ field, however as soon as it’s used within my functions.php file no value is output, I’m just wondering if anyone has any pointers, feel like I’m missing something very simple.

    $test_it = get_field('test',$post_id);

  • Figured, using the field key did the trick.

  • how is $post_id being assigned a value in your function?

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘get_field – functions.php’ is closed to new replies.