• jessy

    (@jessy-marco)


    total count do not work, because there is a bugg, so replace the function for this:

    function update_views($post_id) {
        global $wpdb;
        $p2_table = $wpdb->prefix.unique_p2_table();
        $views = get_total_views($post_id) + 1;
    
    	if (get_total_views($post_id) == 0)
            insert_views($views, $post_id);
    	   $result = $wpdb->query("UPDATE $p2_table SET view = $views WHERE post_id = '$post_id' AND ip_addres = '".$_SERVER['REMOTE_ADDR']."'");
       return ($result);
    }
  • The topic ‘Plugin still works WP 4.3.1’ is closed to new replies.