Home › Forums › General Issues › populate divi gallery module with ACF › Reply To: populate divi gallery module with ACF
@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.
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.