给WordPress主题分类\标签页面增加点赞功能-WordPress主题

摘要:首先说明WordPress AJAX 给WordPress主题分类\标签页面增加点赞功能或者是WordPress文章点赞…

首先说明WordPress AJAX 给WordPress主题分类\标签页面增加点赞功能或者是WordPress文章点赞都会给数据库增加表,自WordPress 4.4新增了Term meta,意味着可以像文章点赞一样来实现分类\标签页面增加点赞功能

wordpress当前把下面的代码加入到functions.php:

AJAX js代码加入的你的js文件中,注意admin-ajax.php的路径!

完成以上所有的操作以后,我们开始讲WordPress分类/标签页面点赞调用方法:

在对应归档页面使用下面代码,如在其他地方调用则不会有任何输出。

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