2 Pingbacks/Trackbacks
-
tucsonvelo
-
http://www.saphod.net/ Marco
-
http://sanitarium.se/ ba
-
http://www.allkins.co.uk Dominic Allkins
-
http://somethin-clever.blogspot.com/ Chris Baclig
-
http://www.saphod.net/ Marco
-
http://jamescooke.info James
-
http://www.saphod.net/ Marco
-
http://jamescooke.info James
-
http://www.saphod.net/ Marco
-
http://webolog.net/ Josh
-
http://www.abhizworld.com Abhi
-
http://blog.fublo.net/2010/08/pingbacks-trackbacks-disqus-wordpress/ Getting pingbacks & trackbacks working with Disqus & WordPress | Fublo Ltd blog
-
http://scottsdalecomputing.com/display-pingbacks-on-wordpress-posts-with-disqus-comment-system/ Display Pingbacks on WordPress Posts with Disqus Comment System – Scottsdale Computing
-
http://thomasspear.name/ Thomas Spear
How To Add Ping-/Trackbacks When Using Disqus
July 9th, 2010 | View Comments
As I mentioned in this post, ping-/trackbacks are not yet supported by Disqus when using the plugin for WordPress. When you export the comments from WordPress, ping-/trackbacks are simply not imported into the Disqus database, yet (they promised that they are working on it).
In the meantime, I managed to add this feature by using the ping-/trackbacks that are stored within the WordPress comments table (mostly, this will be wp_comments).
This is what it looks like (see the original post):
How it’s done:
I wrote a function named DisplayPingTrackbacks() which achieves the goal. In the single.php, I simply put it before comments_template() is called by WordPress, which – in my case – looks like this:
Here is what the function looks like (added to the functions.php in the theme’s template directory):
function DisplayPingTrackbacks() { // Do not do anything if Disqus is not installed if(!dsq_is_installed()) return; $current_post_ID = get_the_ID(); global $wpdb; $sql = "SELECT comment_author_url, comment_author FROM $wpdb->comments WHERE comment_post_ID = $current_post_ID AND comment_approved = '1' AND (comment_type = 'pingback' OR comment_type = 'trackback') ORDER BY comment_date ASC"; if ($post_pingtrackbacks = $wpdb->get_results($sql) ) { $number_of_pingtrackbacks = count($post_pingtrackbacks); if ($number_of_pingtrackbacks == 1) { echo "<div id='pingtrackback'><h3 style='font-size:14px;margin-bottom:10px'>One Pingback/Trackback</h3><ul>"; } else { echo "<div id='pingtrackback'><h3 style='font-size:14px;margin-bottom:10px'>" . $number_of_pingtrackbacks . " Pingbacks/Trackbacks</h3><ul>"; } foreach ($post_pingtrackbacks as $post_pingtrackback) { echo "\n<li><small><a href='"; echo $post_pingtrackback->comment_author_url; echo "'>"; $author = $post_pingtrackback->comment_author; echo html_entity_decode($author); echo "</a>"; echo "</small></li>"; } echo "</ul></div>"; } }Now, I only hope that ping-/trackbacks are still stored within the WordPress database in the future and that they don’t get lost because of the Disqus plugin…
[Update from 2011-01-03]
It seems like the Disqus Comment System had a major overhaul, which also means that it now shows ping-/trackbacks that are stored in the WordPress comments table. Nice, but I’ll still stick with my aforementioned workaround, since I do not like the formatting of the Disqus system’s built-in solution.
Filed under: WordPress Stuff · Tags: comments, disqus, howto, pingback, plugin, trackback, troubleshooting, wordpress