Support

Account

Home Forums General Issues Retrieves data from ACF in widget

Unread

Retrieves data from ACF in widget

  • I have this code:
    <div data-jw-widget
    data-api-key="insert your unique API key. Leave the quotes"
    data-object-type="insert either 'movie' or 'show'. Leave the quotes"
    data-title="insert movie or show title. Leave the quotes"
    data-year="insert movie/show release year. Leave the quotes "
    data-theme="light"
    ></div>

    In this “data-title” and “data-year” I would like to receive data from two custom fields “nazwa_oryginalu” and “rok_premiery. I try like this, but it doesn’t work:

    data-title="<?php the_field('nazwa_oryginalu'); ?>"
    data-year="<?php the_field('rok_premiery'); ?>"

    Could you advise us on how to do this?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.