Display the total number of trackbacks on your wordpress
December 15, 2008
With a little modification, You can display the total number of trackbacks. we first have to create a function. paste the following code on the functions.php file from your theme: function trackback_count() { global $wpdb; $count = "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_type = 'pingback' OR comment_type = 'trackback'"; echo $wpdb->get_var($count); } Once the file is saved, you can call the function anywhere you want: <?php trackback_count(); ?> Read More →
Display comments and trackbacks separately
October 19, 2008
When you’re reading comments on a blog post, trackbacks are annoying. It’s way better to display it separately from comments. Open and edit the comments.php file from your theme. Find the comment loop: foreach ($comments as $comment) : ?> // Comments are displayed here endforeach; Replace it with the following: <ul class="commentlist"> <?php //Displays comments only foreach ($comments as $comment) : ?> <?php $comment_type = get_comment_type(); ?> <?php if($comment_type... [Read the full story]
Separate WordPress Comments and Trackbacks
July 14, 2008
With all the WordPress themes available to WordPress users, it always surprises me how these incredible theme authors don’t take a few extra seconds to separate their theme’s trackbacks from the comments. It doesn’t look very professional and it can make it extremely difficult to follow a conversation in the comments. Separating your trackbacks and comments requires a minimal amount of coding work to set up. First, you’ll want to make a backup of your comments.php file just in case something goes wrong. Next, follow... [Read the full story]




















