From the category archives:

Code

Improve the speed of your blog, just like these running horses are faster because they bleached their hair.

These horses are somehow not cool. Speeding up your blog is.

I am working on a WordPress project that has a pretty heavy database, and I want to be able to auto-optimize the WordPress database. Even though they are integrating this functionality into WordPress 3.0, I want it now, and without having to use a plugin (I have had some issues with WP-DBManager configuring properly on a few sites).

If you add the following code to your functions.php file, it will automatically optimize your WordPress database every 6 hours, keeping it squeaky clean.

{ 0 comments }

Stop loading WP-Downloads CSS File

If you want to disable the WordPress plugin WP-DownloadManager’s download-css.css file from being loaded, add the following code to your functions.php file:

remove_action('wp_print_styles', 'downloads_stylesheets');

Alternatively, if you would just like to use your own stylesheet, you can add a file named download-css.css to your theme’s directory, and the plugin will automatically load your stylesheet instead.

{ 0 comments }

The Shopp default RSS/XML/Google Base solution was not enough.

RSS Feed, BABY!

I needed to have a Google Base feed that featured all the store products. For some reason, the recommended process wasn’t working for me. It was either showing only recent products, or it wasn’t working at all.  Here’s how I fixed it:

{ 3 comments }

Making the Simple Taxonomies WordPress Plugin Semantic

I’ve been using Joost de Valk’s Simple Taxonomies plugin for a couple of projects, and I’ve been very disappointed by the formatting of the terms output code.

When configuring the plugin, you have the option of choosing “Add terms to the end of posts” or “Add terms to the end of excerpts.” If you do, you get a <div> and a couple of spans. Not very semantic. Also, the code uses an #id, instead of a .class, meaning that if you have more than one post on a page with taxonomies, it no longer validates.

Simple Taxonomies uses terms, so let’s make a list of them!

Here’s a way to reformat the code and prevent overwriting in future plugin updates. We’re going to strip the code and use a definition list instead (<dl>). Definition lists in HTML have a term and description; just as a custom taxonomies creates a taxonomy and its terms.

{ 1 comment }

How to Display a Random Testimonial or Post in WordPress

August 12, 2009

Set up a testimonials category — no need for a plugin.

There are a couple of plugins designed specifically for testimonials, but I didn’t want to use them; they use their own databases, and don’t keep with WordPress’ simplicity. If possible, the best way to work with WordPress is to use it’s built-in functionality.

I also wanted to have the testimonials as a category in WP, rather than as a separate plugin. This code will work for any type of category, not just a testimonial.

Here’s how to create a random post item in your sidebar:

Read the full article →

Get Adjacent Images – More WordPress Functions

August 4, 2009

Get the adjacent photo, man.

WordPress, just get the adjacent image links. I’ll tell you what to do with them!

WordPress is normally great about providing functions that have a return and an echo version.  In WordPress, if a function has the prefix get_, then it does not echo (print it into the content), but rather returns the result so that it can be saved as a variable, like so:  $example = get_example();

There are some functions that only have echo capability, so I wanted to share my work-around with you all.

Updated image_link functions

  • adjacent_image_link() » get_adjacent_image_link()
  • previous_image_link() » get_previous_image_link()
  • next_image_link() » get_next_image_link()
Read the full article →

WordPress Digg Shortcode Function – As Seen on WordPress.com

July 23, 2009

When moving from WordPress.com, my Digg shortcodes broke.

I wanted a simple way to transition my Digg chicklets to a WordPress.org installation.

I created a function that does nothing special, except for reproducing the Digg shortcode functionality on WordPress.com. All you need to do is enter [digg=http://digg.com/path_to_story_on_digg], and it will create a Digg This chicklet for you. Here’s the code in action →

Read the full article →

Mountain America Jerky Redesign Launched

July 10, 2009

Mountain America Jerky Redesign

Mountain America Jerky Before Redesign Mountain America Jerky - After Redesign

Mountain America Jerky - Before and After Redesign

I’m happy to announce that today the new Mountain America Jerky website launched. Check out the site and try some of their crazy-good Garlic Black Pepper Beef Jerky. One perk of working with a nice client who sells beef jerky is getting samples of the product! Seriously, though, it’s the best jerky I’ve ever had.

I started working with Mountain America Jerky as a SEO. Jerky is a competitive field, and they wanted to improve their ranking. After working with Chuck on the website’s optimization, he told me he wanted to go big and rebrand the site. The result is a rustic, functional, beautiful website.

Read the full article →

SEO Randomizer: Save the Value of Your SEO'd Links

December 19, 2008

Search engines attribution link value is falling for SEOs and web designers.

Update: Now use the SEO WordSpinner plugin to implement this concept.
Use the get_seo_spin() PHP function in your theme’s footer.php file.

Footer links are dropping in SEO value

How to stay relevant while getting great links

As a web designer and SEO, I place links in the footers of most of my designs. Clients don’t mind (I always request the link), and it’s a high-quality link. Most small web design and SEO companies do.  Footer links have become very spammy, however, and sites try to stuff as many links there as possible.

SEOmoz has an article about footer link optimization and claims that

Footer links may be devalued by search engines automatically
Check out the evidence – Yahoo! says they may devalue footer links, Bill Slawski uncovers patents suggesting the same and anecdotal evidence suggests Google might do this (or go further) as well. Needless to say, if you want to make sure your links are passing maximum value, it’s wise to avoid the footer (particularly the footer class itself).

The era of the PageRank-passing footer links are coming to an end. The search engines have a good reason for devaluing the links — but how can we get the juice back?

Let’s consider the following issues:

  • Footer links are being devalued by search engines
  • Footer links have a low click-through rate
  • Having the same link on every page makes the link less valuable
  • Google doesn’t like spam
Read the full article →

Nofollow SEO for your WordPress Functions

November 7, 2008
Link Condom

Pretty crude idea of nofollow, isn't it?

While working on a recent website, I became frustrated by the lack of nofollow support in many WordPress functions.  Make that, most WordPress functions.

There are a few WP functions that I wanted to add nofollow to, so here’s a list and a download link:

Read the full article →