Support

Account

Home Forums Front-end Issues Unable to call acf fields via javacript in divi code module

Unread

Unable to call acf fields via javacript in divi code module

  • Hi All,

    I’ve been trying to get several images that are external url fields to be loaded into a post template so i can have dynamic posts that use images based on exterla URLs specific to each post.

    I have 4 ACF fields that are urls ( image1, image2, etc).

    I’ve been trying to call these fields using a divi code module, and it seems that when acf running the javascript functions within a divi code module inside a post page it is unable to get any of the post acf variables

    I ran var postID = acf.get(‘post_id’); and i’m getting null back.

    Has anyone come across this, does anyone know if there is a trick to accessing/referencing the acf data of the parent post that the code module is within?

    Cheers

Viewing 1 post (of 1 total)

The topic ‘Unable to call acf fields via javacript in divi code module’ is closed to new replies.