Get Paid to Blog About the Things You Love

Wordpress isn’t perfect, and so is my grammer

Well, i found one. A bug that is. Turns out WordPress’ new widget code didn’t expect to be moved around. If you place the comments box below the code for the sidebar, it throws the comments function off. A simple one line fix, proposed at http://trac.wordpress.org/ticket/5439 by me should get everything up and running.

If you run into this problem yourself, here’s a quick fix:

If you don’t know what ftp is, skip below to the other, ugly fix.

Using your favorite ftp program, navigate to the wp-includes directory where your WordPress installation is located. Find and edit the widgets.php file. Scroll all the way down to the bottom and locate a line of code that says: do_action(’widgets_init’);

Below this code, insert the following line: unset($id);

Be sure to include the semi-colon;

Voila, your comments will now display correctly!

Ugly Fix:

I say this fix is ugly because code doesn’t really belong in your templates… but oh well.

You’ll have to make the change in all pages that display comments. in my case, it is only the single post page that I had to make this change in. Locate the <?php comments_template(); ?> line of code. Immediatly above this, insert <? unset($id); ?>. Save the page, and your comments should display properly.

Hope this helps. email me at dcostalis@whathuhstudios.com if you have any problems

Stumble it!

Post Info

This entry was posted on Friday, December 7th, 2007 and is filed under development. It has 66 views

Comments Feed. | Leave Comment | Leave Trackback.



Previous Post: Vista giving a “Server execution failed” error »
Next Post: Easy CSS fixed footer »
Most viewed posts


Leave a Reply

Note: Any comments are permitted only because the site owner is letting you post, and any comments will be removed for any reason at the absolute discretion of the site owner.