Php 多个divi模块库一页

Php 多个divi模块库一页,php,wordpress,divi,Php,Wordpress,Divi,我使用此代码填充Divi gallery模块+ACF。 我正试图改变它。因此,我可以在一个页面上创建多个库 谢谢你的回答 //使用ACF库填充divi库 添加过滤器('et_pb_模块_短码_属性','ACF_库',20,3); 功能ACF_画廊($props、$atts、$slug){ $gallery_模块_段塞=阵列('et_pb_gallery'); if(!in_数组($slug,$gallery_模块_slug)){ 返回$props; } if('product'==get\u

我使用此代码填充Divi gallery模块+ACF。 我正试图改变它。因此,我可以在一个页面上创建多个库

谢谢你的回答

//使用ACF库填充divi库
添加过滤器('et_pb_模块_短码_属性','ACF_库',20,3);
功能ACF_画廊($props、$atts、$slug){
$gallery_模块_段塞=阵列('et_pb_gallery');
if(!in_数组($slug,$gallery_模块_slug)){
返回$props;
}
if('product'==get\u post\u type()){
$props['gallery_ID']=获取字段('galerie_barevlatek',假,假);
返回$props;
}
其他的
if('project'==get\u post\u type()){
$props['gallery_ID']=获取字段('galerie_obrazku',false,false);
返回$props;}
否则返回$props;
}