原本的缩略图显示优先级规则是:
1.如果存在特色图,则返回特色图
2.如果没有特色图则返回文章第一张图片
3.没有图片,则显示文字
修改称如果没有特色图,则显示随机图片
修改文件路径:
主题目录/inc/function-image.php
return get_template_directory_uri().'/images/random/'.mt_rand(1,8).'.jpg';//zrz_get_first_img($content,0);
在主题目录/images/random 文件里放文件名为1到8的.jpg 图片,就会随机显示这些图片
在线交流反馈:[su_button url=”/forums/forum/52302″ target=”blank” style=”stroked” background=”#cfd2d6″ color=”#2b2929″ size=”4″]7b2柒比贰主题论坛[/su_button]