RSS
 

Wordpress Permalinks for SEO

12 Apr

The Problem

By default Wordpress permanlinks are set to generate the post number in your URL. Not only is this ugly and weird looking but it is also awful for SEO. Lets take a look at the default.

Ugly Wordpress Permalink

Yuck! We can do much better than that. Lets take a look at how.

The Solution

Luckily Permalinks that make sense and Permalinks that are great for SEO can be taken care of quickly and easily. If you are working on a new site that has no posts or pages on it yet then you can skip this paragraph. The first thing we want to do is pull out .htaccess which lives in the root of your directory. Make a backup of this file just to be safe. Once opened go ahead and delete anything that Wordpress has written in it. Save it and put it back in your root.

Easy enough right? The next thing we want to do is navigate to the permalinks settings within our Wordpress dashboard.

Permalinks Settings

Once you’re there you can see a few options to choose under the Common Settings Section. There are a few options built in you can choose from but were looking for the best solution for SEO.
Click Custom Structure and put the following tag in the input box: %postname% Save it. It should now look like this (Wordpress will automatically put the slashes in so do not do it yourself).

Custom Permalink

Congratulations, you now have nice looking SEO friendly permalinks.

While you’re at it

While you’re at it why not install one of the great SEO plugins Wordpress has available. My two favorites are The All In One SEO Pack and Headspace 2. Enjoy!

 
 

Free Cute Band Aid PSD

07 Apr

;3I recently launched a site for a tattoo parlor and wanted to have a nice image for the “Aftercare” section where they explain how to take care of your tattoo during that fragile first few weeks. This is what I came up with. I think it is hilarious and awesome and I want to share it with the world so take it! Use it for whatever you want! Enjoy!

Download the PSD Here

 
No Comments

Posted in Freebies

 

Getting Random With PHP

05 Mar

Want to randomly generate something on your site using PHP? Me too! Let’s look at a pretty clean approach to this task.

The Code

$random_text = array(“Random Text 1″,
“Random Text 2″,
“Random Text 3″,
“Random Text 4″,
“Random Text 5″);

print_r($random_text[array_rand($random_text)]);

How it works

Pretty simple stuff but fun at the same time. We declare our variable first. In this case, it is “random_text.” Then we start an array of as many items as we want. The beauty lies in the array_rand() function, which is really what makes this script so tiny and elegant. Enjoy!

 
 

The right way to install a Drupal module

05 Mar

There are two ways to install a Drupal module: the right way and the wrong way. Let’s take a look at doing it the right way and see why this method is desirable.

Get yourself a module, bro…

First lets get our module. Head on over to http://drupal.org/ and look to the right of the page. There should be a link for modules.

I’m going to go ahead and grab the WYSIWYG API module. Always make sure to check and see if your module has any dependencies that you will have to install as well. In this case we don’t need to worry about that. Also make sure the module is compatible with your version of Drupal. Once you have all that sorted out, go ahead and download the correct module. You will need something to unzip it with. I suggest 7-zip or WinRAR.

Install it like you know you should…

So now you have a sweet new module that is compatible with your version of Drupal. I know what you’re thinking. “I’ll just throw it in the modules directory and call it a day! I don’t need your stupid blog anymore, chump!” Well I am here to tell you that you are wrong. Dead wrong. Here is why: All the modules that come packaged with a fresh Drupal install live in this folder. If you throw all your custom modules in this folder, you’re not going to know what’s what when you go to upgrade. So do yourself a favor and navigate to the all directory (yoursite.com/sites/all). There is even a readme in this directory telling you what to do. It reads:

// $Id: README.txt,v 1.3 2006/12/23 15:35:51 dries Exp $

This directory should be used to place downloaded and custom modules
and themes which are common to all sites. This will allow you to
more easily update Drupal core files. These modules and themes should
be placed in subdirectories called modules and themes as follows:

sites/all/modules
sites/all/themes

So go ahead and create a “modules” and “themes” folder in your all directory. Now take that nice new module you downloaded and unzipped and drag it into your sites/all/modules directory. Pat yourself on the back friend. You did the right thing.

Enable your module…

Log in to Drupal and navigate to Administer -> Site Building -> Modules. All the modules that come with Drupal will be listed at the top, so scroll down to the bottom until you see the “other” section. If all went well you should see your module here with a description to the right of it that will also list any dependencies that it has. To enable to module, simply click the box to the left of it. Now click the Save Configuration button. Congratulations, you have successfully downloaded, installed, and enabled a Drupal module the correct way.

 
2 Comments

Posted in Tutorials