是不是一直觉得每次写文章,发布下载链接,一串串的网址,或者锚文本都非常不美观。用插件解决,貌似太过小题大做了。显示下载按钮,方法其实很简单,只要把如下代码插入主题目录下的functions.php中就可以了!
/**红色部分是下载链接的图片 **/
function download($atts, $content = null) {
return ‘
img src="”http://www.shanhubei.com/wp-content/themes/Ality2/img/default.jpg”" alt="" border="”0″" />’;}
add_shortcode(“download”, “download”);
把链接图片地址改成你的就可以了!
使用方法:在文章需要插入下载地址处,如下添加
[download]下载地址[/download]
微信公众号
手机浏览(小程序)
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_46.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57