• Resolved mfivey

    (@mfivey)


    Hi GT3!

    is it possible to utilize one of your gallery pre-sets with the output / callback from ACF gallery-field?

    best wishes
    mfive

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author gt3themes

    (@gt3themes)

    @mfivey Hi there! Our Pro version has the filter which allows to achieve it.

    Thread Starter mfivey

    (@mfivey)

    hi too. i have the PRO but i can not find it..do you have a tutorial or docu for that?

    Plugin Author gt3themes

    (@gt3themes)

    Here you go core/block/class-basic.php:453
    We do not have the documentation for that purpose.

    Thread Starter mfivey

    (@mfivey)

    you mean this is possible with elementor pagebuilder right? we would like to use it just with coding…we dont use elementor on this project…is that possible anyhow?

    Plugin Author gt3themes

    (@gt3themes)

    You’ve asked about ACF, it’s not related to Elementor.

    Thread Starter mfivey

    (@mfivey)

    but the file you named me and the line…there is something about elementor…

    Plugin Author gt3themes

    (@gt3themes)

    It’s not related to Elementor, it’s a filter that you have to use:
    $settings = apply_filters(sprintf(“gt3pg-pro/blocks/%s/settings”, $this->name), $settings, $this);

    Thread Starter mfivey

    (@mfivey)

    ok thx is ee! but how can in inject the images-array which i get from wordpress coding?

    Plugin Author gt3themes

    (@gt3themes)

    @mfivey Here is an example:

    add_filter(
    ‘gt3pg-pro/blocks/grid/settings’,
    function($settings){
    // Load value (array of ids).
    $images_acf = get_field(‘gallery’);
    $images = array();
    foreach($images_acf as $image) {
    $images[] = array_merge(array(
    ‘id’ => $image,
    ‘title’ => ”,
    ‘caption’ => ”,
    ‘item_class_list’ => array(),
    ‘item_category_list’ => array(),
    ‘item_category’ => ”,
    ‘item_class’ => ”,
    ), wp_prepare_attachment_for_js($image));
    }
    $settings[‘ids’] = $images;

    return $settings;
    }
    );

    Thread Starter mfivey

    (@mfivey)

    ok thx gt3

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Gallery with ACF’ is closed to new replies.