我想为此使用 Gallery DIVI 模块。
这是 DIVI 使用的简码:
[et_pb_gallery _builder_version="3.24" gallery_ids="23219,23218,23217,23215,23216,23214,23213,23212,23211,23209" posts_number="20" show_title_and_caption="off" show_pagination="off" zoom_icon_color="#ffffff" hover_overlay_color="rgba(6,83,182,0.5)" hover_icon="%%47%%" hover_icon_tablet="%%47%%" hover_icon_phone="%%47%%" box_shadow_vertical_image_tablet="0px" box_shadow_blur_image_tablet="40px" box_shadow_spread_image_tablet="0px" text_shadow_horizontal_length="text_shadow_style,%91object Object%93" text_shadow_horizontal_length_tablet="0px" text_shadow_vertical_length="text_shadow_style,%91object Object%93" text_shadow_vertical_length_tablet="0px" text_shadow_blur_strength="text_shadow_style,%91object Object%93" text_shadow_blur_strength_tablet="1px" title_text_shadow_horizontal_length="title_text_shadow_style,%91object Object%93" title_text_shadow_horizontal_length_tablet="0px" title_text_shadow_vertical_length="title_text_shadow_style,%91object Object%93" title_text_shadow_vertical_length_tablet="0px" title_text_shadow_blur_strength="title_text_shadow_style,%91object Object%93" title_text_shadow_blur_strength_tablet="1px" caption_text_shadow_horizontal_length="caption_text_shadow_style,%91object Object%93" caption_text_shadow_horizontal_length_tablet="0px" caption_text_shadow_vertical_length="caption_text_shadow_style,%91object Object%93" caption_text_shadow_vertical_length_tablet="0px" caption_text_shadow_blur_strength="caption_text_shadow_style,%91object Object%93" caption_text_shadow_blur_strength_tablet="1px" pagination_text_shadow_horizontal_length="pagination_text_shadow_style,%91object Object%93" pagination_text_shadow_horizontal_length_tablet="0px" pagination_text_shadow_vertical_length="pagination_text_shadow_style,%91object Object%93" pagination_text_shadow_vertical_length_tablet="0px" pagination_text_shadow_blur_strength="pagination_text_shadow_style,%91object Object%93" pagination_text_shadow_blur_strength_tablet="1px" box_shadow_horizontal_tablet="0px" box_shadow_vertical_tablet="0px" box_shadow_blur_tablet="40px" box_shadow_spread_tablet="0px" z_index_tablet="500" /]
我想做的是替换这个gallery_ids="23219,23218,23217,23215,23216,23214,23213,23212,23211,23209"
使用短代码将附加图像的 ID 输出到后分隔的 por 逗号中,如下所示:
gallery_ids="[get-image-ids]"
这样我就可以为我的自定义帖子类型使用页面模板。