Wordpress adds article browsing statistics (refresh is not repeated ). Wordpress itself does not contain article browsing statistics. you can use the plug-in wp-postview, but refresh still calculates the number of browsing times. 1. First, add the following code to functions. php under the topic. wordpress does not include the article browsing statistics. you can use the plug-in wp-postview, but refresh still counts the number of browsing times.
1. First, add the following code to functions. php under the topic. this code can also be found online.
getPostViews( = 'post_views_count' = get_post_meta(, , ( == '' delete_post_meta(, add_post_meta(, , '0' "0" setPostViews( = 'post_views_count' = get_post_meta(, , ( == '' = 0 delete_post_meta(, add_post_meta(, , '0' } ++ update_post_meta(, , }
2. to solve the problem of increasing the number of refresh statistics, it must be placed at the top of the article page. it seems that no output can be made before php sets cookies, which hurts. My single. php page
Bytes. 1. add the following code to functions. php under the topic...