Category Archives for WordPress

Customizing Your WordPress URLs

With any new blog I work on, one of the first things I do is change the permalink structure. WordPress permalinks will determine the URL that your post will appear under. Just go to any blog, click on a post title and then look at the URL shown for it. If the blog is using the default permalink structure, you will see a question mark and some numbers. Since keyword rich URLs is one way to optimize your blog for the search engines, why not change your permalink structure to a more search engine friendly one?

In most cases I use the custom structure of /%postname%/ (see below caveats on when you might want to use a different one). You can set this up for yourself under Permalinks in the Settings Menu.

Type in "/%postname%/" for your custom permalink structure

This means (as a default) my post title will also comprise my URL (with dashes in between the words). You do also have the ability to customize your permalink to be different than your title. I often do this because I want my blog posts to have catchy titles, which doesn’t always mean that they are optimized for keywords.

Now here are the two caveats you need to keep in mind:

  1. If your blog has been around for a while, proceed with caution with changing your permalink structure. Your existing blog posts may have already been indexed by Google with the old URLs, and other sites may have linked to them. In this case both Google and those sites would get broken links. There is a way around this, but the one avenue I’ve looked at (mod rewrite code in the web server) is non trivial and not available to many. More research needed. Update: there are plugins that will set up the 301 redirects for you
  2. If you think you are going to have a lot of pages & posts (more than 50), read through this forum discussion, you may want to consider /%year%/%postname%/ instead. My blog has a lot of posts, so I may need to consider a change, however point 1 will apply so I will need to proceed with caution.

Four Essential WordPress Plugins

If you are a blogger with your own hosted WordPress site, consider installing these WordPress plugins:

  • Akismet Run, don’t walk, to install this plugin. In fact in most brand new WordPress installs, you should see this plugin already in your Plugins dashboard, ready to be activated. This plugin does a great job of filtering out spam comments on your blog .. it’s really painful to delete these comments by hand. The one trick, is that you will have to create an account at wordpress.com to obtain your WordPress API Key. However once you have that, you will be able to activate Akismet
  • All-in-One-SEO For more control over your page title and meta tags: see my earlier post on title tags and a pointer to this plugin
  • Google Analytics This doesn’t have to be a plugin as you can update the footer.php code directly with the Google Analytics tracking code, however there are several plugins available. I installed Yoast’s plugin and it was straightforward. With this, you should set up your google analytic account first. If you think you will need help, I would suggest watching the YouTube videos on the topic, just search on “google analytics wordpress plugin video” and browse through them until you find one that makes sense to you. Why do you want to install this plugin? So that you have information about the visitors to your site, what keywords they use … etc. Don’t worry about if you don’t understand google analytics at first. The important thing is to start the analytics tracking now, so you can look at your blog’s performance trends in the future.
  • Google XML Sitemaps This plugin will help Google crawl your blog (and help Google discover it in the first place!). It creates a list of your blog posts and pages in a special format that Google likes (called XML) and updates it when you change or updates your blog. With this plugin, you MAY need to know how to create and change permissions on a file on your server, (usually done through a FTP client such as Filezilla). Another cool thing, which I plan to cover more in a future post, is that it helps with eliminating duplicate content. Instructions and download for Google XML Sitemap Plugin. You may be also able to install it directly from your wordpress config panel (Add New Plugin).

Update: March 4, 2013: These plugins are all still valid. I’ve published a more extensive list of WordPress plugins critical for SEO that you might want to check out as well.

Firefox and IE and tag conflicts

I have been doing some customization to the wordpress theme I have using for this blog.  The original theme was too mono-colored and the link color was hard to see.  And of course I wanted my own header.

Many blog themes put the title of your blog both as the page title tag and also as a H1 somewhere as text in your header.  This was fine with me but I wanted to have it display in a smaller font size to be more compatible with my custom header and not overrun my graphic.

So I went into the css of the blog theme and found the id tag (called “h1”) that specified the size in “em” and picked a smaller size.

It looked great on firefox, but on IE7 the size was unchanged.   Furthermore I had also changed the link color from a barely distinguishable grey to a dark red with a command to underline the link on hover.   Again worked great on Firefox 3, totally ignored on IE7.

With some help from my webdesigner friend from talksure, we figured out the problem.   For the blog title, the theme not only enclosed the text in a div tag specifying the id “h1”, but it also had additionally enclosed the text in h1 tags (confusing .. but they *are* different).   Of course the css had a larger size specified for the h1 tag. What was happenning was Firefox gave the div tags priority .. but IE7 gave the regular h1 tags priority.

A similiar problem explained the link color problem.

If you have conflicting tags, the behavior by IE and Firefox is likely to be different.

We think the reason that the title was enclosed in both a div tag and a h1 tag was to give the search engines a recognizable H1.  And it makes sense this would be the blog title.  However for now, the H1’s are removed so that my blog looks the same on all browsers.

1 3 4 5
css.php