Mon
28
Sep 09
Fine-tuning my WordPress Blog Part I
Over the last few days I spent a little time on WordPress, interesting plug-ins, and some settings. First of all, I improved your ability to comment on my ramblings. Now you have the power to conveniently format your text. In addition, there’s a new option to keep you up to speed, if you decide to produce some text. This option is disabled by default but you can turn it on by activating the checkbox titled “Notify me of followup comments via e-mail”, which is located right under the text editor.
Next, I finally customized my 404 error page. The default page may be nice but I didn’t like it all that much. This isn’t a final version but it’s definitely better than its predecessor. In addition, I fixed a few things which were broken in IE. Naturally, this site is optimized for Firefox but the layout should now be the same on IE as well. If the site looks really messed up you can always fall back on Firefox.
Of course, I installed a few additional plug-ins and optimized a few lines of code, even though PHP isn’t a scripting language I’m very familiar with. Let’s just say that I removed a few unnecessary PHP/MySQL calls by hardcoding a few things as outlined in this excellent article over at Digging into WordPress. Anyway, the site loads a tad faster and surely is a bit more convenient to use than it was before. Finally, thanks to Register Plus you can register more easily now.
Last but not least, I tried to configure one of the new plug-ins, Cleaner Gallery, by changing the styles a little. Apparently, I only have to copy the contents of the provided style sheet into my theme’s style sheet. The next step should be adding the following line of code to your functions.php:
<?php remove_action( 'wp_head', 'cleaner_gallery_css' ); ?>
Unfortunately, that didn’t work at all. So I had to dig a little deeper and came up with the following solution. I removed the previous line of code from my functions.php and directly edited the plug-in code (cleaner-gallery.php) by changing
/**<br /> * Add the Cleaner Gallery stylesheet to the header for use.<br /> * Cleaner Gallery uses its own stylesheet because we shouldn't load these<br /> * things directly into the page.<br /> *<br /> * @since 0.1<br /> */<br /> if ( !is_admin() )<br /> wp_enqueue_style( 'cleaner-gallery', CLEANER_GALLERY_URL . '/cleaner-gallery.css', false, 0.7, 'all' );<br />
to
/**<br /> * Add the Cleaner Gallery stylesheet to the header for use.<br /> * Cleaner Gallery uses its own stylesheet because we shouldn't load these<br /> * things directly into the page.<br /> *<br /> * @since 0.1<br /> *<br /> * if ( !is_admin() )<br /> * wp_enqueue_style( 'cleaner-gallery', CLEANER_GALLERY_URL . '/cleaner-gallery.css', false, 0.7, 'all' );<br /> */
That finally did it and prevented the plug-in from adding it’s css-reference to the header.