Home › Forums › General Issues › populate divi gallery module with ACF
@wassy83 When I Include Gallery Code to my Child theme function.php and done with changes as you said it gives me error
“function(t){return r.a.createElement(f.a,k({rawContentProcesser:h.default.replaceCodeContentEntities},e.props))}”
but when I save the and referesh my page by exiting visual builder it start showing me gallery but not in visual builder editor mode. . . . ? Any help
You gents tried this? https://dividezigns.com/divi_codes/acfs-gallery-with-divi-native-gallery-module/
Also – why are there so many of the same reply in this thread?
Why so many of the same reply… this happens when someone’s reply is incorrectly marked as spam, their comment is not shown and they keep trying to post the same comment and it is marked as spam every time. Then when the user’s comments are marked as not spam they all appear. Moral, if your comment does not appear after posting it do not keep trying to post it. Someone is checking spam and will eventually catch the error and correct it.
@wassy83 You are amazing man, using the hook is way easier and works perfectly.
I even followed your steps and made one for the CountDown timer:
//populate divi countdown timer with ACF date&time
add_filter('et_pb_module_shortcode_attributes', 'cd_divi_acf', 20, 3);
function cd_divi_acf($cd_props, $cd_atts, $cd_slug) {
$cd_module_slugs = array('et_pb_countdown_timer');
if (!in_array($cd_slug, $cd_module_slugs)) {
return $cd_props;
}
if ( 'players' == get_post_type() ) {
$cd_props['date_time'] = get_field('date&time', false, false);
return $cd_props;
}
else return $cd_props;
}
Thanks again.
@yourtrustedfreelancer you are welcome my friend. I hope ET will release soon a more accurate list of hooks, cause there are hundred of hidden features like this that are not reported on developers documentation 🙁
@wassy83 Thanks! Works perfect!
How can I do the same with video module and ACF URL?
Hello,
Thanks for this thread, it has been very useful. Does anyone know if it’s possible to use this code for 2 galleries on a page instead of one?
I was using this but it had stopped working on my site after the recent Divi speed update. I tried Divi Machine from Divi Engine and it worked perfectly in the Builder – highly recommended and far less worry about bits breaking https://diviengine.com/product/divi-machine/
HI @poppyvine mine is still working on latest divi 4.10.8. Regards
That is good to know… It must have been some other issue that broke it but I couldn’t get it back working again so delighted to have found a plugin that will take care of it. I said I’d post it in case someone else would also prefer the plugin route!
Is there any way to use this for the DIVI GALLERY EXTENDED plugin instead?
https://www.elegantthemes.com/marketplace/divi-gallery-extended/
Hi,
there are two problems.
1. The Free ACF Plugin –> navneil-naicker / acf-photo-gallery-field
return a array with posts, not the ‘id’.
So you have to change the Code to
'include' => implode(', ', array_column(get_field('fotos',false,false), 'id')),
2. The Divi Dynamic Module Framework (Settings–>Performance) didn’t load the new gallery type.
you have to insert
function divi_child_gallery_module_class( $classlist ) {
$classlist['et_pb_gallery'] = array( 'classname' => 'ET_Builder_Module_Gallery_ACF',);
return $classlist;
}
into the functions.php
The topic ‘populate divi gallery module with ACF’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.