Popup Comments For WP. Plus A Moron And A Geek

Aaaar, Mateys, today’s hints revolve around pop up comments for ye olde WordPress(e).

Didn’t ye always want them? Won’t change your hits, ‘cepting perhaps thy page views. However, some people really like them, since can go from one post to the next breezily.

What say I help ye out. Do we have an accord? Yea? Great!

First of all, ye have to go to they WP admin site, then to presentation, theme editor, and pick header. Ye there? Belisimo!

Look for something like ?php comments_popup_script(); // off by default ? surrounded by < >. Found it? OK, now, you can either remove the // or // off by default. Bamm! Pop up comments enabled.

Didn’t find it? Add (?php comments_popup_script(); ?) substituting < and > for ( and ) exactly as written. Put this on a line right above ?php wp_head. See this picture.

Now, something important to know. Some themes HATE popup comments. The Johnny Bravo ones, both blue and green, that you can find on the WP theme viewer, while killer (I used to use Johnny Blue, and loved it), hate pop up comments. Have to hit the comment button juuuuust right. Wasn’t worth it for a really cool theme.

If your theme will not work correctly with pop up comments, you either don’t use ’em, or get a new theme. WP 2.04 comes with a ton, and you can also try Emily Robbins, who has well over 700 links to them.

As a sidebar, if you upgrade to WP 2.04, make sure you save a copy of your themes. That way you can easily cut and paste your header, sidebar, index, etc, if you happen to use one of the ones that come automatically with WP 2.04.

Now, your pop up comments work, but you notice that the text box is wider then the pop up box. Uh oh, now what? Crap’s running off the screen! Annoyed As the book says, Don’t Panic!

What you need to do is go go into your WP files, through FTP or web FTP. Like using your “network places.” Look in wp includes, and you will see a php file called comment-functions.php. Copy it, paste it in two different folders on your PC. One is for editing, one for backup.

Open one copy with notepad or a text editor. Look about 1/3 of the way in for a line that says: function comments_popup_script($width=400, $height=400, $file=”). You can change the width and height with ease. I have set my width to 600, to account for my Journalized and Yaaaarr themes. The other 2 are A-OK with any size.

Save the file, then copy and replace the existing one in wp-includes. Check to make sure everything is fine! If not, that is why you have a backup copy.

There are lots of other changes you can make to popup comments. Themes will look for a popup comments file within the themes folder, and the file is generally located in the WordPress Default theme. Not a big file, and it is easy to see what sizes are for things like the text box. But, again, always have a backup file. Safe isn’t always fun, but, in this case, it can save you a wopper of a time fixing things that went BOOM!

Oh, I almost forgot about the moron and the geek.

Way way after update (mostly for my information, for the next time I run into this issue): something about WP2.2 and 2.3 is causing an issue with being able to comment while logged in and using pop up comments. Keep getting a white screen, and comment never goes thru. This is happening when using the WordPress Default theme’s comments pop up file. Have uploaded the pop up comments file from Laila 2.o into the MyJournal theme, seems to work fine. Even though you are logged in, you still have to enter your info, and, unfortunately, it won’t remember your info. But, hey, it works!

Save $10 on purchases of $49.99 & up on our Fruit Bouquets at 1800flowers.com. Promo Code: FRUIT49
If you liked my post, feel free to subscribe to my rss feeds.

Both comments and trackbacks are currently closed

One Response to “Popup Comments For WP. Plus A Moron And A Geek”

  1. You are the best man. I’ve been looking for this solution for 4 hours, until I found yours. You are great. Thx a lot. Such a simple solution.

Pirate's Cove