Tweaking Boldy

Site5 Boldy LogoOur recent site relaunch was based upon a free Premium WordPress theme, Boldy by Site5. Leading up to our new site release and since that time we’ve released significant updates to this theme. There have been so many rather bold adjustments that we decided we would let the world know what exactly the process of tweaking an existing theme entails. We’re also planning future posts on the related topics of performance, security and interoperability.

Here’s what all we did to make “beBoldy”…

  1. Added or repaired administrative settings for disabling certain jQuery JavaScript libraries. Specifically, we repaired the ability to toggle off Cufón fonts JS file inclusion. We added the ability to toggle on/off PrettyPhoto Lightbox, Smooth Navigational Menu, and the footer contact form. This improves performance, because when certain features aren’t being utilized they shouldn’t be loaded.
  2. Updated all of the JavaScript libraries. We upgraded the jQuery library from v1.4.2 that was released with the theme to the current v1.5.2 linked via the free Google CDN. Improves performance.
  3. Separated the contact page form and processing logic into a custom plugin rather than being part of the theme itself. Changed the form to match some of the styling on the blog comments form. Updated the jQuery Form plugin (AJAX form responses) to the minified version that comes pre-built into WordPress. Removed external form processor script and switched mail delivery over to the more reliable built-in wp_mail() function. Applied stripslashes() to remove backslashes from message text.
  4. Separated the “Share” links from the bottom of blog posts into a custom plugin rather than being part of the theme. Repaired the broken links and added two Twitter parameters for username “via” and “related” fields for tweet pre-population.
  5. Updated the NivoSlider library for the home page rotator. Updating this JavaScript library also required updating the base CSS file that the plugin uses. Removed the initial loading image due to it being unnecessary and taking additional download time.
  6. Cleaned-up the main CSS file. Removed unnecessary spacing and minified the code. Removed a few items (images) that were in the CSS but missing causing performance degradation. Moved certain optional elements to separate CSS files, calling them only when required. Consolidated form styling entries. Moved all CSS calls to wp_enqueue_style() for optimal placement and load ordering.
  7. Moved all JavaScript to the footer of the HTML using wp_enqueue_script() for optimal placement and load ordering. Enqueued the calls from the specific pages that require them, for example home.php, to affect only the applicable page.
  8. Moved the home page boxes and home page slider images from being WordPress pages to simple text areas within the theme settings page. This helps keep WordPress pages better organized and prevents the possibility of search engine results for non page content. Applied htmlspecialchars() to the new and old fields to be compatible with certain codes using within the blobs.
  9. Removed some wasted spacing in the PHP files HTML output sections. Improves performance and SEO.
  10. Switched XHTML Transitional mode to Strict mode. This helps the browser render more quickly, but does require more diligence when managing pages, posts and widgets in order to remain W3C validator compliant.
  11. Removed forced <p> paragraph code symbols on the contact page and home page elements so the user can decide whether those blobs should contain any number of paragraphs or codes that can’t be wrapped within a single paragraph.
  12. Applied fix to the search form field. The “type your search” remark was disappearing after somebody clicked on the field, then clicked away. Fixed WAVE accessibility validation on site search box by adding an invisible field label.
  13. Removed the unwanted “Request a Quote” button from the home page element. Fixed a bug by adding removal of slashes on the administrative controls page to prevent backslashing of quotes in this box.
  14. Removed the “Blog Categories” display from the sidebar in the blog section. One can use a widget instead for greater flexibility.
  15. Added sidebar auto scroller to enhance any vertically scrollable pages. This keeps our phone number visible regardless of where somebody has scrolled to on the site.
  16. Moved Google Analytics code to the header as per the newer specifications. This ensures that Google measures the page load speed and improves performance.

So, as you can see there’s a lot to be done in perfecting an existing theme. It makes one realize that the cleanest theme is one that contains as little functionality as possible as that is best suited for Plugins.

Thank you for taking the time to read this post. Note that we really appreciate feedback about what we’ve written as well as what topics you’d like us to discuss in future posts so please do let us know.