Support

Account

Home Forums General Issues get_field('field', $page_id) not returning a value. Reply To: get_field('field', $page_id) not returning a value.

  • I can display the custom field on the page with the ACF option for my text element.
    -> this will display 15, hence my conclusion that the field has the correct value.
    But I can’t use that ACF option of the text element to put that value as a parameter on the shortcode.=> As in I can’t print/echo the id into the actual shortcode, if this would be the shortcode [shortcode id=”?”], then I can’t get the ACF value on the ? as I can only get that with the text element (which is a shortcode itself).

    So I need to get the field via the page id within the shordcode code.

    var_dump gives me: NULL