[纯代码]教你怎样为WordPress主题添加读者墙的方法-WordPress主题

摘要:今天给大家分享一下为wordpress主题模板添加读者墙功能的方法实现,本代码可以应用与主题侧边栏与页面,而且样式非常华…

今天给大家分享一下为wordpress主题模板添加读者墙功能的方法实现,本代码可以应用与主题侧边栏与页面,而且样式非常华丽,下面我们以PAGES页面添加为示例来给大家演示一下操作过程。

第一步:在wordpress核心文件内添加读者墙函数

在function.php文件内添加如下代码

注$limit=’18’ ,即显示为18个读者。请在/wp-content/目录下新建avatar文件夹,用来存放头像缓存文件。

第二步:添加读者墙相应CSS样式

第三步:调用读者墙函数

在需要调用读者墙的位置添加如下代码

来源:http://www.wazhuti.com/3386.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_12767.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?