[英]wordpress not showing gallery images
I've made a gallery
and it's ok in editor but not working in site view , it show shortcode
instead of images. 我已经建立了一个gallery
,可以在编辑器中使用,但不能在站点视图中使用,它显示的是shortcode
而不是图像。 it works before but now.. i don't know what's happened. 它以前但现在有效。.我不知道发生了什么。
$gallery = get_post_field('post_content', 186);
echo $gallery;
Post Content: 帖子内容:
[gallery link="file" ids="110,147,148,154,153,152,151,150,149,155,156,157,158,159,160,161,162,163,164,166,167,168,169,176,177,178" orderby="rand"]
repeat, it showing all images in editor but in site view it just show this code. 重复一遍,它在编辑器中显示所有图像,但在站点视图中仅显示此代码。 any idea what is the problem? 知道是什么问题吗?
result: 结果:
[gallery link="file" ids="110,147,148,154,153,152,151,150,149,155,156,157,158,159,160,161,162,163,164,166,167,168,169,176,177,178" orderby="rand"]
您应该处理简码:
echo do_shortcode($gallery);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.