Well … looks like I’ve created my first, very own plugin for WordPress. The base install of WP gives you the option to have a comments popup. I was doing that on my MT blog, and wanted to do that here as well. Well, the default comments popup page showed both the trackbacks and the comments. THAT I didn’t want.
Well, in order to get ONLY the comments to show up on the comment popup page, I used the code that Scriptygoddess had for separating the trackbacks and comments on the wp-comments.php page.
That gave me what I wanted for the comments popup page, but how was I going to go about getting the trackback popup page? Well, I modified the code for the comments popup and created a plugin for it. You can download my plugin here. (I don’t think there was one already made. I couldn’t find anything like it.)
Now I needed a wp-trackback-popup.php file. Well, I modified the wp-comments-popup.php file and got this.
In order to get this to work, I put the following in the header …
<?php trackback_popup_script(); ?>
Then, I put the following in the index.php file where I wanted the popup to show up (this was inside of THE LOOP).
<?php trackback_popup_link('Trackbacks (0)', 'Trackbacks (1)', 'Trackbacks(%)'); ?>
It’s working fine for me so far. If you try this out and have any problems, please let me know. And if this post is too confusing, let me know, and I’ll try to explain things better.
If you do end up using this, let me know. I’m curious if anyone else wanted something like this.
Last Updated on: 25 Jun 04 at 1:21pm
Plugin file: trackback_popup.php
Other needed files: wp-trackback-popup.php - put this in the root directory
:: EDIT 25 Jun 04 11:42am :: The plugin has been updated to give the correct number of trackbacks AND pingbacks. Prior to this, it didn’t count the pingbacks. I changed the MySQL query, and it should now give the correct number.
:: EDIT 25 Jun 04 1:21pm :: This should now give the correct number of pingbacks and trackbacks. I had to add an extra function to my plugin. It worked in my testing. If you still have trouble with this, please let me know.