Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem of not counting WordPress WP-PostViews manually through Ajax

Shulou Source: shulou.com Published: 2022-06-03 20:14:51 10月02日 Update

This article will explain in detail how to manually solve WordPress WP-PostViews does not count the problem through Ajax, Xiaobian feels quite practical, so share it with you as a reference, I hope you can gain something after reading this article.

Memcached is enabled on a website and WP-PostViews is installed, but I don't know why the view count of the article doesn't work.

After a bit of fumbling, WP-PostViews is counted by sending requests through Ajax. The website that sees the problem sends this request at all.

After some wordpress background settings and plug-ins groping, or did not find the reason.

Helpless, make the ultimate killer, manually add the script of this request, add it to the bottom of the page, the code is as follows:

$.ajax({ url: "http://** *.com/wp-admin/admin-ajax.php" , data: { "postviews_id" : "" , "action" : "postviews" , "_" : new Date ().getTime() } }); About "How to manually solve WordPress WP-PostViews do not count the problem through Ajax" This article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

Tags: Manual problem article article more website good practical code function content reason background bottom plug-in helplessness killer killer mace fundamental knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology MySQL NVidia Xiaomi Huawei