Jared Quinn

IT Consulting :: Design :: Events Management

Archive for December, 2005


Back at Work


After a very relaxing break away from civilization, I am back at work with a whole swag of work on right now. I’ll be getting to everything in my inbox over the next few days and should hopefully have caught up with any outstanding jobs over the next two weeks.

WordPress Blogging Essentials


While performing WordPress installations for several clients lately, they have asked me “what are the essentials?”, there are a few good lists of essential plugins out there and loads of information on WordPress SEO.

This article is the list of what was done with JaredQuinn.info and on Bob Mutch’s SEO Company blogs for Plugin Installations and SEO.

Plugins

Search Engine Optimisation

Search Engine Optimising a WordPress blog is a relatively easy task thanks to the excellent construction and ease of customisation of WordPress.

Permalinks

The single most important thing to do with WordPress for SEO is Permalinks. In the WordPress administration panel ensure you set your permalink structure, it can be found under Options. Pick a structure to use and stick to it, changing it will cause you problems with any inbound links.

The permalink setting I use for JaredQuinn.info is:

/%category%/%year%.%monthnum%.%day%/%postname%/

Titles

Next, some modifications to your theme are necessary. Most search engines display the meta title tag in the search results, it is important to have something meaningful in there.

To produce the titles on this site I use:

<title><?php bloginfo(’name’); ?><?php if ( is_single() ) { ?> :: Blog Archive <?php } ? <?php wp_title(); ?></title>

There is no use setting a neat title in your theme and then using useless titles in your posts and pages; put some thought into each and every one.

Keywords

Using keywords is useful for SEO; to do this use the Keywords plugin mentioned in the previous section. It adds a keywords() function to WordPress. In each of your posts/pages you can add a Custom Field named Keywords. Set this to the comma seperated list of Keywords to use.

<meta name=”keywords” content=”jared,quinn,it,consulting,consultant,design….,<?php echo keywords(); ?> />

Description

The Meta Head Description plugin extends the wp_head(); function to include a description tag. Description META tags are used by search engines such as Google as the text displayed in the results instead of whatever the crawler happen to find.

Make sure your theme calls wp_head(); in header.php.

Standards Compliance

Crawlers and other robots will understand your page better if it is standards compliant. I prefer all my pages to strictly adhere to XHTML 1.1; however this is not always entirely possible. You can use the Validator at validator.w3.org to validate your code. I personally prefer pages with NO errors and NO warnings. If you are going to the effort to ensure compliance it’s worth making sure you have a valid DOCType , Content-type and Character set.

While on the subject of WordPress themes, the theme you pick is important. JaredQuinn.info uses a fully XHTML 1.1 compliant theme, which is loaded content first followed by navigation. This means that crawlers and spiders see the important parts of the page first!

Content… Content… Content!!

Getting higher rankings on Google and other search engines is all about links. The best way to get links is having content that is worth linking to. If you don’t have content worth linking to, it’s pretty pointless getting a #1 ranking, not to mention annoying to the rest of the world.

Google Sitemaps

Google sitemaps are a useful way of providing the full structure of your site to Google in a single easy to use format, which is even easier to accomplish using the WordPress Google Sitemap Generator plugin.

References

The first time I considered SEO for a WordPress blog, I found the following pages invaluable:

WordPress 2.0 Beta Testing


It’s getting closer to the release of WordPress 2.0, and i’m already getting questions from some customers of mine who I support WordPress installations for, so I figured it was time to put myself up a sandbox, do a test upgrade and see how it all goes?

This is also a step-by-step guide of how I achieved it.

Backup Data

First thing is first, let’s get a play copy of my database to play with. Hopefully you’re web provider is kind enough to allow you to create multiple databases, if not visit the Contact page and ask me for WordPress hosting!

Using phpMyAdmin complete the following steps:

(Users of my WordPress hosting service can find phpMyAdmin installed at http://…../system/phpMyAdmin and will require thier webhosting username/password to login to it).

Select the database you’re using for WordPress from the drop down menu of databases, followed by the Operations tab. Enter the name of a new database and click Go.

You should then also make sure you have a backup copy of all your files somewhere as well, before you go playing too much. You don’t want to lose anything!

Change to the root of you’re webhosting directory (mine is ~/jaredquinn.info), and create a folder for your sandbox/testarea to be installed info.

I’m living dangerously here, and am using the latest (regularly updated copy of WordPress from checked out from subversion, as I intend to use this for WordPress development.) You can use a straight install of WordPress into this directory if you like; or to get the cutting edge stuff:

svn co http://svn.automattic.com/wordpress/trunk/

Once you’ve got the code extracted (or downloaded or otherwise copied) into your sandbox area, copy your wp-config.php into there and change the name of the database to the one you just created.

Next, you need to make sure that your database has the correct paths and URLs in it for the new blog, to do this we need to get back into phpMyAdmin, find the wp_options (where wp is the prefix you use for your tables) and select Browse.

Find siteurl and set it to the URL to get to the new path you created (I just needed to add ‘dev’ on the end of mine, as I set up an Apache alias to point /dev to the path of the subversion trunk directory inside my sandbox.)

Once you’ve done that, grab your browser and head to the wp-admin area of your new blog.. Mine happens to be http://jaredquinn.info/dev/wp-admin/. Wow a nice new shiny login screen, and once you’ve logged in, a nice new shiny theme for the admin panel. Welcome to WordPress 2.0

What Next?

My theme or plugins were not copied over, as this was a fresh install from subversion, so I had to go and set back to a default WordPress theme and then head to my main blog to see how it was.

My next couple of articles will deal with converting my theme and plugins over to this new install, before finally making the site live once I’m happy with the result.

Some other relevant links that may help you on your path to 2.0…

Recent Posts


This is how I got my “Recent Posts” list appearing on my front page and sidebar for various pages.

I run the SEM Static Front Page plugin to provide the non-blog front page to this website, this website wasn’t originally planned as a blog, but as I’ve developed it, i’ve found the blog functionality to be better for some parts of the site and began using it more. It is certainly better then managing too many WordPress pages.

The code I used for generating the list I found in the old WordPress wiki, thanks to at http://wiki.wordpress.org/Recent Posts thanks to Nick Momrik.

Here it is:

function get_recent_posts($no_posts = 5, $before = ‘<li>’, $after = ‘</li>’, $show_pass_post = false, $skip_posts = 0) {
    global $wpdb, $tableposts;
    $request = “SELECT ID, post_title FROM $tableposts WHERE post_status = ‘publish’ “;
        if(!$show_pass_post) { $request .= “AND post_password ='’ “; }
    $request .= “ORDER BY post_date DESC LIMIT $skip_posts, $no_posts”;
    $posts = $wpdb->get_results($request);
    $output = ‘’;
    foreach ($posts as $post) {
        $post_title = stripslashes($post->post_title);
        $permalink = get_permalink($post->ID);
        $output .= $before . ‘<a href="’ . $permalink . ‘" rel="bookmark" title="Permanent Link: ‘ . $post_title . ‘">’ . $post_title . ‘</a>’ . $after;
    }
    echo $output;
}

Nick suggests adding it to the my-hacks.php file for older versions of WordPress, I use a plugin called “My Extras” which I stick functions like this one into. This makes it nice and easy to enable/disable the entire plugin when things go a little wierd on me (yes, it does happen!)

Creating a plugin like that is relatively easy, and there is plenty of documentation on it in the Codex

Next, I added some code to my Home page in WordPress’s Manage Pages.

<div style=“float: left; margin: 5px; border: 1px solid #973131;”>
<ul style=“list-style: none; font-size: .80em; color: #973131;”>
<h5 style=“font-size: 1.5em; margin-bottom: 5px; color: #973131;”>Recent Posts</h5>
<?php get_recent_posts(10, ‘<li style="margin-bottom: 5px;">‘, ‘<br />‘, 0); ?>
</ul>
</div>

This should be stylised and put in my style sheet, I will get to that another time, for just getting it working I tend to throw styles into the documents. Bad practice. Guilty as charged.

Next to the sidebar.php file.

I decided my front page should have the links in the content, but other pages will have the list in the sidebar. Instead of the list on the front page, I’m going to display a list of Categories and the number of posts in each.

<?php if($post->post_name == ‘home’) { ?>
        <ul><li id=“pagenav”><h2>Categories</h2></li>
        </ul><ul style=“line-height: 1.25em;”>
        <?php wp_list_cats(‘list=1&children=1&optioncount=1&hideempty=1′); ?>
        </ul>
       
   <?php } else { ?>
        <ul style=“font-size: .80em;”><li id=“pagenav”><h2>Recent Posts</h2></li>
        </ul><ul>
        <?php get_recent_posts(10, ‘<li style="margin-bottom: 5px;">‘, ‘<br />‘, 0); ?>
        </ul>
       
    <?php } ?>

I had all sorts of trouble using is_home() with the SEM Static Front Page plugin, so I decided to check for the post_name being home, which seems to work very well.

There you have it. A Simple easy way to get your recent posts list displayed on a page.

sublist v2.3 Released


The latest version of subList, version 2.3, the recursive page lister for WordPress has been released.

Whats New?

  • More flexible formatting
  • No longer incompatible with “List Subpages” plugin.
  • Uses more standard tags (no longer uses HTML comments)
  • Fully backward compatible.

It can be downloaded from the SubList page.

Migration to WordPress 2.0


I was expecting migration of everything to the release candidate of WordPress 2.0 to be a difficult task, but it wasn’t. So far I have yet to make any changes to anything, here’s what I did.

  • Copy my theme from my current wp-content/themes directory into the new one.
  • Ensure all required plugins are activated from the administration panel.
  • Copy the plugins directory from wp-content/themes directory into the new one.
  • Copy my “downloads”, “images” and “pic” (and/or any that you use) from the old wp-c0ntent into the new one.
  • Test

I had no issues, nothing to report out of the ordinary and nothing much to do at all.

My development blog can be found at http://jaredquinn.info/dev if anyone cares to check it out, it’s only up to date as of a few posts ago.