Home > blog > Fine-tuning my Word­Press Blog Part I

Fine-tuning my Word­Press Blog Part I

September 28th, 2009 Leave a comment

    Over the last few days I spent a lit­tle time on Word­Press, inter­est­ing plug-ins, and some set­tings. First of all, I improved your abil­ity to com­ment on my ram­blings. Now you have the power to con­ve­niently for­mat your text. In addi­tion, there’s a new option to keep you up to speed, if you decide to pro­duce some text. This option is dis­abled by default but you can turn it on by acti­vat­ing the check­box titled “Notify me of fol­lowup com­ments via e-mail”, which is located right under the text editor.

    Next, I finally cus­tomized my 404 error page. The default page may be nice but I didn’t like it all that much. This isn’t a final ver­sion but it’s def­i­nitely bet­ter than its pre­de­ces­sor. In addi­tion, I fixed a few things which were bro­ken in IE. Nat­u­rally, this site is opti­mized for Fire­fox but the lay­out 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 addi­tional plug-ins and opti­mized a few lines of code, even though PHP isn’t a script­ing lan­guage I’m very famil­iar with. Let’s just say that I removed a few unnec­es­sary PHP/MySQL calls by hard­cod­ing a few things as out­lined in this excel­lent arti­cle over at Dig­ging into Word­Press. Any­way, the site loads a tad faster and surely is a bit more con­ve­nient to use than it was before. Finally, thanks to Reg­is­ter Plus you can reg­is­ter more eas­ily now.

    Last but not least, I tried to con­fig­ure one of the new plug-ins, Cleaner Gallery, by chang­ing the styles a lit­tle. Appar­ently, I only have to copy the con­tents of the pro­vided style sheet into my theme’s style sheet. The next step should be adding the fol­low­ing line of code to your functions.php:

    <?php remove_action( 'wp_head', 'cleaner_gallery_css' ); ?>

    Unfor­tu­nately, that didn’t work at all. So I had to dig a lit­tle deeper and came up with the fol­low­ing solu­tion. I removed the pre­vi­ous 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 pre­vented the plug-in from adding it’s css-reference to the header.

    Categories: blog Tags: , ,