Support

Account

Home Forums General Issues Acf pro within an iFrame

Helping

Acf pro within an iFrame

  • Hello,

    I’m having some issues using acf pro in an iFrame, what I’m doing is very simple, I have a page that contains an iFrame, in this iFrame I load the wp-laod:

    
    require_once '../../../wp-load.php';
    

    I can load a normal field in a page, but I can’t load any option fields (or repeater or layout), for example this doesn’t work:

    `
    get_field( ‘key’, ‘option’ )
    `

    This might not be an acf issue but rather something missing on my side on how I load wordpress. Do you have any idea how I can fix this?

  • to add some more context, the option page is added using acf_add_options_page

    if I use get_option I can see my option, if I do acf_options_page()->get_page("my-page") I can see the page.

    If I add an option page with the UI all works find.

    so:
    – acf_add_options_page + iFrame (wp-load.php) doesn’t work
    – UI + iFrame (wp-load.php) works

    acf_add_options_page runs in the add_action('acf/init', 'init_acf')

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

You must be logged in to reply to this topic.