Our 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”…
- 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.
- 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.
- 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.
- 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.
- Removed some wasted spacing in the PHP files HTML output sections. Improves performance and SEO.
- 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.
- 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.
- 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.
- 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.
- Removed the “Blog Categories” display from the sidebar in the blog section. One can use a widget instead for greater flexibility.
- 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.
- 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.