SEO Blog

SEO & Images

May 2, 2009

SEO on images is really important. Every picture is another opportunity to use the keyword(s) you’ve been optimizing for, and images.google.com, actually generates a surprising amount of traffic if you optimize well for an image that everyone likes. The Brown Spectator, for example, at one time was the #1 entry on images.google.com when you searched [...]

Get More Free SEO Information →

How to Pick a Good Domain Name

May 1, 2009

There are a lot of things that go into google ranking a website. One of the most important factors, however, is a pages url. A few years ago, I made a site for a small magazine called Closing Remarks. It’s URL “Closing-Remarks.com” ended up getting the site indexed really high on Yahoo for the keyword [...]

Get More Free SEO Information →

The Importance of Sitemaps

April 30, 2009

I started using Google’s Webmaster tools extensively about a month ago. It’s super helpful. What it seems to show, however, is how much weight Google puts in your sitemap. Search Engine Watch, has a great article on how to construct and integrate a sitemap (or more than one sitemap) into your site.

Get More Free SEO Information →

Google gets their Water-based Data Center Patent

April 29, 2009

Back in September, Google made waves by submitting a patent for wave-powered datacenter. Yesterday, SEO By the Sea reported that Google was granted its patent. Congratulations Google!

Get More Free SEO Information →

Speeding Up WordPress

April 29, 2009

Joost De Valk put together a presentation for the A4U Expo in Europe yesterday. His slideshow is great. And I think I’ll do a few posts focusing on the points he put together. WordPress Optimisation – A4UExpo View more presentations from Joost De valk. Install WP-SuperCache Joost recommends that you install a plugin called WP-SuperCache [...]

Get More Free SEO Information →

How to Use Google Analytics

April 25, 2009

Google Analytics is an incredibly powerful resource that Google has made available for free. If you want to learn how to use Google Analytics Goal Conversions, look at Google Analytics’ bounce rate, or do anything else, take a look at NewFangled’sGoogle Analytics Slideshow. How To Use Google Analytics View more presentations from Christopher Butler.

Get More Free SEO Information →

Retrieve a Post’s First Image and Resize it with TimThumb

April 23, 2009
I spent a bunch of time trying to figure out how to retrieve the first image of a post. I found a bunch of articles with code samples and one plugin: Simple Image Grabber, WordPress Forum, Live Experience, WP Recipes, and Justin Tadlock. In nearly every set of comments, people were trying to figure out how to integrate the image retrieval code and Darren Hoyt's TimThumb. Well, I've done it, and you can kype my code if you'd like. This tutorial assumes that you've already got TimThumb installed on your site, that you know how to use it, and that it's installed in your theme's directory inside of the folder "scripts". The following code goes in your theme's functions.php file. It is a modified version, taken from Smashing Magazine's 10 Exceptional WordPress Hacks:
 
//Get the First Image
function catch_that_image() {
  global $post, $posts;
  $first_img = '';
  $url = get_bloginfo('url');
  ob_start();
  ob_end_clean();
  $output = preg_match_all('//i', $post->post_content, $matches);
  $first_img = $matches [1] [0];
 
  $not_broken = @fopen("$first_img","r"); // checks if the image exists
  if(empty($first_img) || !($not_broken)){ //Defines a default image
    unset($first_img);
  } else {
    $first_img = str_replace($url, '', $first_img);
  }
  return $first_img;
}
Now, open up your template to the page where you want timthumb to display the first image in the post. Cut and past the following:
 

Fatal error: Call to undefined function catch_that_image() in /home/spiduns9/public_html/index/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()'d code on line 28