让WordPress主题缩略图特色图片支持GIF动图-WordPress主题

摘要:默认的wordpress程序上特色图像时会自动剪切图片尺寸,所以上传gif图片后,前台显示缩略图会被剪切成静态图片,那我…

默认的wordpress程序上特色图像时会自动剪切图片尺寸,所以上传gif图片后,前台显示缩略图会被剪切成静态图片,那我们如何保证我们上传的gif可用呢。只需要将下面的代码添加到wordpress主题的funtion.php里面即可。

以上代码功能为自动判断图片后缀,设置其缩略图大小为原图。

来源:http://www.wazhuti.com/3546.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_12750.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?