tedcarter
Member
Posted 1 year ago #
I'm using "Twitter Tools" with the function "Create a blog post from each of your tweets". I want to display, after post content, the link to the original tweet using $wpdb. Without any results, unfortunately.
I tried with get_results, get_var, get_row
Any suggestions?
tedcarter
Member
Posted 1 year ago #
found.
global $wpdb;
$time = get_the_time('Y-m-d H:i:s', $post->ID);
$wpdb->aktt = $wpdb->prefix.'ak_twitter';
$tweet = $wpdb->get_row("SELECT * FROM $wpdb->aktt WHERE tw_created_at = '$time'");
echo '<a href="http://twitter.com/username/status/'.$tweet->tw_id.'" title="Posted: '. $time .'">Link</a>';