Archive for the ‘Wordpress’ Category

Serve IE6 Visitors the Default WordPress Theme

I don’t really like IE6. Who does? I did have a chunk of PHP code that made sure IE6 got no CSS or JavaScript, but that code didn’t like WordPress much, so I looked for a more elegant solution. I found it in the form of a plugin from Nathan Rice. It sends IE6 users the...

Excluding Multiple Categories In WordPress

Whilst working on a clients site today, adding a new section, I came across a small problem where I needed to exclude 2 categories from the themes index.php file. The home page only contains one post, so to make sure no one could fiddle with the amount of posts shown I hard coded in a limit...

7 WordPress Customizations

Just because your site is powered by WordPress, that doesn’t mean it should look like a blog! I’m going to show you a few ways to make your WP powered site look more like a static website. Random Posts If your site focuses on one category but uses more, it would be a good idea to have...

WordPress Custom Fields

There are many long winded tutorials on how to get the custom field data from a post, so I just wanted to say it’s a one liner and isn’t complicated at all! Just change the name of the field so it matches the one you want to display. <?php echo get_post_meta($post->ID, 'field_name', true);...

Comments On Your WordPress Homepage

Earlier today I hit a little road block. The client wanted a blog posts comments and comment form on the home page. It sounds simple but just calling the comments.php file just doesn’t work. This was the solution: <?php $withcomments = "1"; comments_template(); ?> Add that just before the endwhile statement like this: <?php $withcomments = "1"; comments_template(); ?> <?php endwhile; ?> <?php else : ?> This...