最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin development - Proper way to do a page view count on a page?

programmeradmin3浏览0评论

Is there a way to do this?

I created a Blog widgets that adds a new custom post called CustomBlogPost, and I don't see a way to do a page count aside creating a new widget and then creating a new table and then incrementing a counter for each page for every Ajax Request sent to function.php and then have a hook that increments the page from the Ajax Call.

However, this would cause performance issue, because you would have to do 2 GET and a POST for every page Visit, or 1 GET and an additional SQL request and a POST for every single visit, which would undermine performance.

Is there a better way?

发布评论

评论列表(0)

  1. 暂无评论