【文件属性】:
文件名称:image-gallery-for-cpt-or-post-in-wordpress:易于使用的图库,用于帖子或自定义帖子类型。 拖放排序和多张图片支持
文件大小:7KB
文件格式:ZIP
更新时间:2021-05-24 18:14:13
PHP
酷图片库功能,用于自定义帖子类型和帖子
具有拖放排序和多张图像功能
描述
您可以轻松地将图片库功能添加到帖子/ cpt编辑页面。 加载图像并保存帖子后,您可以在主题中任何位置使用图像url作为自定义字段。
安装(将以下代码添加到functions.php)
为“房屋”自定义帖子类型创建元框:
function property_gallery_add_metabox(){
add_meta_box(
'post_custom_gallery',
'Gallery',
'property_gallery_metabox_callback',
'house', // Change post type name
'normal',
'core'
);
}
add_action( 'admin_init', 'property_gallery_add_metabo
【文件预览】:
image-gallery-for-cpt-or-post-in-wordpress-master
----single-houses.php(873B)
----functions.php(7KB)
----README.md(9KB)