I know I probably can’t see the full picture, but in the excerpt you provided isn’t globalizing $post
.
global $wpdb, $post;
$short = $wpdb->get_var("SELECT url FROM $wpdb->prefix.'tweet_url' WHERE post_id = '$post->ID' ");
I know I probably can’t see the full picture, but in the excerpt you provided isn’t globalizing $post
.
global $wpdb, $post;
$short = $wpdb->get_var("SELECT url FROM $wpdb->prefix.'tweet_url' WHERE post_id = '$post->ID' ");