Feed on Posts or Comments

Monthly ArchiveMay 2007



Blogging & WordPress Chris Gray on 24 May 2007

WordPress Theme switching made easier

One of my favorite features of the WordPress platform is having the ability to drastically change the look and feel of my blog with literally the click of a button. Since release 1.5, WordPress users have had the ability to quickly edit and deploy blog themes with little or no understanding of HTML or PHP.

What is a Theme?
A theme is basically a collection of PHP, CSS, JavaScript, and image files that make up the presentation layer of your blog. The WordPress theme system separates these graphical elements from the “guts” of the WordPress engine, allowing you to “skin” your blog without having to know the inner workings of WordPress (or HTML for that matter).

With literally hundreds of websites dedicated to the development of free WordPress themes, I no longer need to spend hours developing that new Graphical User Interface (GUI) and am free to concentrate on developing content.

The problem with switching Themes
Themes are great but can present a new set of issues. If you are like me, you may not be satisfied with a stock theme and tend to do a little “tweaking” after the fact. At a minimum, I always add a number of tracking scripts (Google Analytics, MyBlogLog, BlogCatalog) to the head section (<head></head>) of my blog allowing me to track site usage. The problem with “tweaking” is that every time I change templates I need to transfer these “tweaks” to my new template. This process is not that difficult but can be rather time consuming and can also lend itself to error.

My solution
With that being said, I thought it was time to investigate an automated solution. Another great WordPress feature is the ability to create plug-ins. A plug-in is essentially a small PHP script that extends the functionality of the WordPress platform. I searched for a plug-in that could move my tweaks to a new theme upon theme activation but was unable to find anything remotely close…so I decided to roll my own solution.

I decided to create a plug-in that would take all of my tracking code (placed in the head section of my blog pages) and store it in one place. In this case I am storing it in the WordPress database. From there I hooked into the WordPress “Loop” so that my tracking code would show up on each page. I also added a feature that allows you to turn this tracking code on/off. This feature is useful if you have a sandboxed WordPress installation (used to test template changes away from your production server) and do not want to skew your stats by repeated testing.

Screen Shot
ToggleTracking 1.0 WordPress Plug-In

Download
If you are interested in trying this plug-in you can get it here:

Download the ToggleTracking 1.0 WordPress Plug-in

Room for improvement
This was my first attempt at creating a WordPress plug-in so there is plenty of room for improvement. While this plug-in handles code placed in the head it does not handle tweaks elsewhere in the page (i.e. sidebar, or footer). I plan on extending it to accommodate these areas and possibly even include functionality to handle ads such as Text Link Ads or AdSense. Drop me a line if you find it useful or have a suggestion.

Note: This post was sparked by Wendy Piersall’s “Wish List Research Project” over at eMomsAtHome.com. Stop by her blog and check out some of the cool things she is doing to help budding entrepreneurs!

Link Love & Blogging Chris Gray on 16 May 2007

The Alexa Link Train makes a stop at SEO Ladder

One of my “daily reads”, Vince Cordic, has tagged me to participate in a neat little concept – The Alexa Redirect Link Train. I guess you could compare a link train to a Meme with the benefit of multiple backlinks (and in this case a possible boost to your Alexa ranking). Well, tip of the hat to Vince for including me in his list.

Below is the original list:

My Additions:

How to Participate:

If you would like to participate in the Alexa Redirect Link Train (even if you weren’t tagged here), simply copy the above list into a post on your blog, visit each of the Alexa redirects and the site itself, and then add your own links to the list.

Will it Work?

I am not sure if this type of scheme actually works, but hey, it’s worth a shot (especially because I have no Alexa ranking at the moment and everybody can use a little link love, right?)

WordPress & SEO Chris Gray on 10 May 2007

One way to avoid Google’s Supplemental Index

I ran across a post over at JohnTP.com on how to Create A Robots.txt File And Increase Your Search Engine Rankings. While I don’t agree that using a robots.txt file will
actually increase your search engine rankings, I do know that robots.txt is a must
have if you want to avoid Google’s duplicate content penalty (also known as “Google Hell”).

What is Google Hell you might ask?
Google Hell refers to Google’s supplemental index. The supplemental index
is where pages go when they are marked as either duplicate, no content, or orphaned
(no incoming/outgoing links). The problem with ending up in the supplemental index
is that supplemental pages do not show up in the main search results page. Instead,
these pages are buried under a link at the bottom of the SERPs (i.e. “repeat
the search with omitted results included”
). I don’t know about
you but never click on this link…

SEO Ladder Supplemental Results

Some of my pages are currently in the supplemental index because they have been
marked as duplicate content. You can check to see if pages from your site are
in the supplemental index by typing “site:yourdomain.com” into a Google
search prompt. Any page listed as a “Supplemental Result” is in the
supplemental index.

Ok, my pages are in the supplemental index how do I get out?
Here is where robots.txt is comes in handy. Robots.txt is a small text
file that resides in the root directory of your website. This file governs which
files and directories a search engine spider will or will not crawl.
You can include/exclude individual files and directories or use wildcards
to block specific directory/file patterns. All major search engines support robots.txt
and will attempt to read it prior to visiting your site. The entire Robots Inclusion
Standard
is located at http://www.robotstxt.org.

I ended up implementing John’s roboots.txt but will probably end up changing to the version recommended by the WordPress codex:

User-agent: *
Disallow: /wp-content/
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-
Disallow: /feed/
Disallow: /trackback/
Disallow: /cgi-bin/

Unfortunately WordPress 2.1.3 does not come standard (to my knowledge) with a
default robots.txt and some of my pages ended up in the supplemental index before
I was able to catch it and add one. Hopefully this post will help you if you are
planning on going live with a new site.

Next Page »