Support

Account

Home Forums Gutenberg Getting data from custom fields outside of blocks Reply To: Getting data from custom fields outside of blocks

  • If you’re trying to get fields bound to the page itself (and not another block), you could get it by passing the page id to the get_field function:

    
    $value = get_field('my_field', $post_id);