Support

Account

Home Forums Backend Issues (wp-admin) block data in backend doesn\'t include field indexes that are used in front end Reply To: block data in backend doesn\'t include field indexes that are used in front end

  • I use to retrieve block fields with get_field, both on the front-end and the back-end. If you experience this problem only on the back-end, try changing all instances of $block[‘data’] into $data and adding this at the beginning of the function:

    <?php
    $data = is_admin() ? get_field( 'data' ) : $block['data'] ;