Archive for the ‘WordPress’ Category

As you're maybe already aware, I've changed the design of this site. At first I had the new theme running locally using Xampp which is installed on my computer. That was fine for rearranging everything and getting it to look right, however I didn't fancy putting my entire blog database into my local install, plus the import of even just a few entries kept erroring (I don't know why).

So whilst I had set everything up as best as possible, I still needed to see the site in its live state, to check everything looked right with all the plugins working. Of course I had to do this without disrupting the live site. However, a quick search later and I came across a WordPress plugin Admin Theme Preview. This is a simple plugin that allows you, as the admin, to select which theme to see. This meant I could view the new theme in its live state, and fix the little niggles that didn't show up on my localhost, of which there were a few!

Great plugin when you come to redesign :)

This post isn't strictly for WordPress users but I see it increasingly on WordPress sites so I'm targeting that as the main example. What am I talking about? Simple on page SEO AND Usability/Accessibility (it's not all about the Search Engines!).

Page Titles

Your page title is the most important aspect. You've got 50+ characters (around 65 I think, but search engines vary) so use them! Keep the main basis of the title unique to each page if you can, however I am a fan of keeping the main site title, be it a site name or company name, at the end of the title so that you still have consistency. Plus at a glance, in the search engine listings, people can still see which company/site you are from the title. I hate being on a site that just has the page title and no identification.

In WordPress it's not so straight forward but still perfectly possible. For standard blogging then your posts will take the same page title as the post title, so bear that it mind. For static pages it does the same, which isn't so good as you don't want 'Home' for your front page, or 'About'. However this can easily be changed with the SEO Title Tag Plugin. This allows you to set the page title for any page (or post). It's a must for anyone running WordPress as a CMS, and also those of you who use static pages on your site. However, if you're using WordPress as a blog then you need to alter your index.php template to allow you to control the front page title. To do this you can replace the standard title of

<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

and change this to

<title><?php if (is_home()) : echo 'Front Page Text Here'; else : wp_title(''); endif; echo ' - '; bloginfo('name'); ?></title>

On this line change the 'Front Page Text Here' to whatever you want displayed, and also change the hyphen to the separator of your choice in the second echo statement. This will then give you the page title followed by the blog name. On internal pages you'll simply get the page or post title followed by the blog name. It's a good idea to at least switch the wp_title() and bloginfo('name') around anyway in my opinion.

Headers

Ahh Headers. These seem to either be misunderstood or just abused, if they're used at all! Using the Web Developer Firefox Extension you can easily go to any page and choose Outline – Headings, and see what header tags are being used and where. It's often interesting to see how the same header tags are styled so differently on different parts of the page. Surely this should say to some people that perhaps they're using them wrongly?! Headers are also important for semantics and usability/accessibility. It creates a structured hierarchy within the page and as a result emphasises relationships between one section and another, and can be used by users of certain screen readers and browsers to navigate through the page based on the structure (yes I just got that from Dave!!).

From my point of view, headers need to be used right to define the right amount of importance to the text within the tags along with the content about to follow. I often see people either using multiple H1s on a page, or one H1 and then a load of H2s and nothing else. There's no structure there, not for the visitor and not for the search engines. Surely, to me, if you use to many H2s then it starts to dilute the importance of a H2 and perhaps a H3 can be seen as more important if there is only one of them. I'm sure it doesn't work like that but if you have everything in a H2 then everything is considered of equal importance, and that's probably not right.

WordPress is a major culprit of this and it's something I wish they'd change. By default, the template tags of wp_list_categories() and wp_list_bookmarks() both output H2 headers. This is quite annoying as you already have H2s around your post titles, are the headings of 'Categories', 'Blogroll' and anything else in your sidebar worthy of the same importance? Personally I don't think so. Changing these is fairly easy however.

For the bookmarks list you can easily add in a couple of extra parameters to control what the heading uses by specifying the before and after tag

wp_list_bookmarks('title_before=<h3>&title_after=</h3>');

For the categories list however you need to simply prevent the header from being output and manually do this one yourself using similar code to

<h3>Categories</h3>
<ul>
<?php wp_list_categories('title_li='); ?>
</ul>

The title_li= parameter tells the function what title to output, so by leaving it blank it's being told to output nothing.

Another misuse of headings that I often see on a blog post is the date below the title also in a header. Why?! The date is of no importance whatsoever. Sure, it should be there for definite, but not in a header tag. You're just diluting the importance of headers by throwing a date into one.

From my point of view there should be one H1 on a page. At the top and contains the site or company name. This is also consistent across the site. My H1 uses image replacement to show the header image of the rose with the PHP code, however 'underneath' it has my blog name. I then use H2s for my post titles and H3s for my sidebar headings IF I can't put them into definition lists which is what I'd actually prefer to use (and will be on the next theme). I also use H3s in my posts, hence why I'd rather not have them in my sidebar at all!

Summary

This isn't a guarantee on anything. I'm not an SEO, just applying some common sense and using what I've read on SEO sites. However SEO aside, semantics and usability dictate that you should keep your pages structured, follow a hierarchy and follow consistency. With CSS in use a lot more these days, it's not too hard to switch tags around, just assign the H3 the same style as the H2 had for your sidebar and you're usually fine.

I just want to apologise to anyone who wonders why their trackback doesn't display on this blog or my AIS Blog. Back when I was fighting comment spam I installed a plugin called WP Hardened Trackback which allowed people to grab a temporary URL to do a trackback when referring to a post. Because this rarely happened I didn't actually put anything out on the site for people to get a link (besides the fact I didn't really understand how it worked!), so instead I just used the plugin to kill all trackbacks.

Since rethinking this decision I disabled the plugin as I found I missed out on people writing about my posts (it's rare but it's nice!) and figured I could deal with the trackback spam considering I'd reduced comment spam to about 5 a day (from 100 or so). However, Trackbacks no longer work on either site. Maybe I've blocked something else, but I don't think I have. I've upgraded WordPress a couple of times since but nothing's changed. Even my own pings/trackbacks don't work which of course is not great as that's the best way to allow people to follow a series of posts through your blog.

If anyone's got any ideas on what I could look at to fix this I'd appreciate hearing them. It's clearly something in the database somewhere!

Just a quick heads up. Seems like there's a security issue with the existing/old FeedBurner FeedSmith plugin to allow you to redirect your feeds through to FeedBurner. If you use this then I recommend you go and grab the newest version, 2.3. I'm only mentioning this as I've not seen it mentioned elsewhere and only caught site of it when checking my stats today.

» New FeedSmith Plugin

I've just upgraded this blog to the new version of WordPress and it seemed to go pretty well. As it is a major update I first grabbed new versions of all the plugins I use to try and ensure I didn't break anything! Luckily everything I use is either already compatible or had been updated ready, so it's all gone smoothly. Even my own WordPress plugin works fine ;)

What's new on this new version? Well from a brief look I've noticed the new tag system, which I probably won't use as I'm not a fan of tag clouds. The best improvement I've noticed so far is the plugin update check. After upgrading I went to take a plugin off that had been replaced with a new name, and noticed another plugin hadn't been upgraded and it just says right below 'There is a new version of *plugin name and version*. Click to download'. So it doesn't upgrade for you (which is good!) but keeps a check on the plugins. Of course I'm guessing those are the plugins known to WordPress, afterall if I upgraded my plugin, there's no way WordPress would tell you ;) I'll get it submitted to them once I've got the admin page done.

The upgrade didn't go 100% smoothly though. I had a load of database errors come up complaining of duplicate entries, however this was in a database table that's new, so it wasn't down to my existing version. I guess the upgrade script has a couple of bugs in it? I'll see what happens when I upgrade another blog and see if the same issue is there. It's not stopped anything from working, and I'm not sure what the new table (wp_term_relationships) is actually for. Maybe it's to do with the tags? Still, otherwise it all seems okay so far. Let me know if you see anything that doesn't look right :)

Update: Seems they've moved a few too many tables around as my front page now doesn't work :( Which means the feed won't either. I may get this fixed before I go away tomorrow else it won't be until Tuesday.

Update 2: Yay I fixed the front page after working out their new category system! I also discovered by category pages were erroring so that's fixed now.

Page 8 of 12« First...«678910»...Last »