Blog Overhaul

The release of WordPress 3.0 introduced a lot of good stuff behind the scenes that I wanted to take advantage of. The new built in Twenty Ten theme incorporates all this new stuff and is pretty nice so I ditched my old custom theme that I was never super happy with. Overall changes:

  • Switched to Twenty Ten theme
  • Customized header with one of my panoramas from Kauai (Menehune Fishpond just south of Lihue)
  • Built navigation menu using new Menu feature
  • Added Contact form
  • Added Google Reader snippet to display recent starred items in sidebar
  • Setup footer widgets with Recent Posts, Tag Cloud, Pages and Categories for unobtrusive navigation links
  • Deactivated Wordbooker, less content Facebook has of mine the better
  • Enabled threaded comments, giving it another try

WordPress 3.0!

WordPress 3.0 was released yesterday and it’s a very nice upgrade. Couple big features include custom post types and taxonomies, new default theme, new navigation menu system, merged MU (run multiple blogs from one install now) and tons of bugs fixes and tweaks. Be sure to upgrade!

StableHost Web Hosting – An Honest Review

Seriously good hosting at a low price
Use 40OFFGEEKY coupon for 40% off US plans

Update: 7/22/2014: Use special coupon code 40OFFGEEKY for 40% off your plan. Buy 3 years up front to get the most savings.

Trying to find honest reviews of web hosts is next to impossible. Do a search on Google and you get a ton of spammy, referral sites. The Web Hosting Talk forum is probably the best resource for real reviews from actual users. A little research there found nothing but glowing reviews for StableHost and practically nothing negative. I thought I’d go for it since it would be hard to be worse than my previous hosts.

I opted for their middle hosting plan (5GB/100GB, free domain) which drops to $5.45 if you sign up for a year at a time. With the USYEARLY coupon you get 50% off for life which makes a whole year of hosting with domain name come out to $32.72. If you offered me hosting for $2.75 a month I’d probably ask what the catch is. Turns out there is no catch, just great hosting.

After signing up and switching over this site, I noticed an immediate increase in speed. Pages in the WordPress admin area would take a couple seconds to start loading and just seemed a little sluggish on LunarPages. The exact same install on StableHost is fast, really fast. I don’t think I’ve seen WordPress run this fast before. I attribute this to nice servers that have not been oversold. The middle hosting plan only gets you 5GB of space and 100GB of transfer, but that is more realistic than a host offering unlimited space and bandwidth for 5 bucks. That just leads to overutilization and slow servers.

Performance is also helped by the use of Lightspeed instead of Apache. Lightspeed is a commercial web server that offers improved performance over Apache, but the extra cost probably keeps it from being more popular on shared hosts.

I’ve only had previous experience with GoDaddy, ResellerZoom and LunarPages, but I would choose StableHost over them and any other shared web host in a heartbeat. Throw in the free domain name and the hosting technically only costs about $23 a year. The WHTUS coupon could end at anytime so I’d jump on it if you are considering a new host or moving hosts.

Seriously good hosting at a low price
Use 40OFFGEEKY coupon for40% off US plans

Show AdSense to Google Search visitors in WordPress

I put AdSense ads on my WordPress plugin pages since the donation button wasn’t exactly raking in the dough. I inserted my AdSense code straight into these pages’ content. Looking through some of my stats I noticed a few of my posts got lots of hits from Google Search that would be good for ads. I didn’t want to show ads to my friends and normal readers so I went looking for a simple solution.

I borrowed some of the code used in this post, http://www.scratch99.com/2008/01/shylock-adsense-plugin-hack-to-avoid-adsense-smart-pricing/. One template function checks the referrer, if it returns true then you display your AdSense code in your post template, single.php in my case. This goes in your functions.php:

function scratch99_fromasearchengine(){
$ref = $_SERVER['HTTP_REFERER'];
$SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');
foreach ($SE as $source) {
if (strpos($ref,$source)!==false) return true;
}
return false;
}

and this goes in your post template where you want the ads to be displayed:

<?php if (function_exists('scratch99_fromasearchengine')) {
if (scratch99_fromasearchengine()) { ?>
INSERT YOUR ADSENSE CODE HERE
<?php } } ?>

And that’s it. Visitors coming in from Google and some other search engines will have whatever ad you want displayed. There are plugins that will do this all for you, but this is simple enough to build straight into your theme. The only downside is if you are using caching, but odds are only your older posts are going to be getting hits from Google. If a page happened to get cached with the AdSense code inserted then everyone will see the ads. Not really a big deal to me, but just something to be aware of.

Blog CSS makeover

Did a little work on my blog’s theme to bring it up to speed with WordPress 2.7. Been using the same theme with a few modifications since WP 1.5 so it was time for a little refresh. List of changes:

  • New font and font sizes.
  • Reset all padding and margins. This made it easy to get consistent spacing across the entire site using margins only.
  • New comments output with gravatar support. Using the new wp_list_comments function with a custom callback to separate trackbacks.
  • Moved header text down so the tails of the Y’s go into the background of the main column, that’s the extent of my creativity.
  • Category and tag pages only show excerpts now.
  • Edited robots.txt and sitemap.xml to avoid Google indexing duplicate content on archive pages.
  • Increased total container width to 895px, my stats show only about 1.2% of people who visit my blog are on 800 x 600 so there’s no point in designing for them anymore.
  • Added code to show Google AdSense to visitors coming straight from a Google search. Did that about a month ago, I’ve made $7 in  February so far.