Count views without get_post_meta

If you provided full code, issue is probably in this line: $wpdb->prepare(“INSERT INTO ‘myprefix_posts_views’ (postid, ip, device) VALUES (%d, %s, %s) ON DUPLICATE KEY UPDATE create_at=VALUES(create_at)”, $postID, $_SERVER[‘REMOTE_ADDR’], $_SERVER[‘HTTP_USER_AGENT’]); Because into column postid you are trying to put variable $postID, when you didn’t declare it anywhere. This column is NOT NULL, so probably you have … Read more

Adding a Admin Style Table in a WordPress 4.x Page

We need to made few changes in the code so that it works properly. Here is the updated code. <?php if ( ! defined( ‘ABSPATH’ ) ) { exit; } if ( ! class_exists( ‘WP_List_Table’ ) ) { require_once ABSPATH . ‘wp-admin/includes/class-wp-list-table.php’; } class Transactions_List_Table extends WP_List_Table { public function __construct() { parent::__construct( array( ‘singular’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)