WordPress Configuration Tips

When Setting up WordPress for the first time there are a few things you may need to do

Switch off WordPress comment
There is a simple way to shut down the comment system on a WordPress site. Turn off the comments on the Settings, Discussion page, Default article settings, which will disable comments on new posts. Then turn off the comments for all your existing posts.

Switch on Search Engine friendly URLs
The default WordPress uses web URLs which have question marks and lots of numbers in them. To improve this, click on Settings, Permalink Settings and change Custom Structure to read /%postname%/ and then Save Changes.

More Advanced Customisation

To exclude a cagegory or multiple categories from the front page
To block a category from the front page, in the sidebar find <?php wp_list_categories(); ?> and change it to <?php wp_list_categories('exclude=1'); ?> . Find which category number by looking at the category list. To block multiple categories use a comma seperated list like <?php wp_list_categories('exclude=1,4,5'); ?>

To sort categories alphabetically and include only the specified categories use <?php wp_list_categories('orderby=name&include=3,5,9,16'); ?>

For more category configuration possibilities see Codex WordPress Categories

To restrict pages to authenticated users
Check out WP-Sentry

Check out The Fabulous Website Chick

We came across this site the other day while browsing a bulletin board, and were very impressed. It deserves an award just for the shear pinkness of it’s WordPress theme, but there is some interesting content and useful Internet marketing tips too. It just shows what you can do with WordPress and some imagination. For a dazzeling look at the pink side of life visit The Fabulous Website Chick, but beware, you might need your shades!

A day in the life of a WordPress Blogger

Sometimes we work for customers who have high security environments, with restrictive settings that can cause problems for developers. An example recently occurred after a Microsoft security scare, and the security policy was tightened to exclude ActiveX controls and client side scripting. When I noticed the dreaded Information Bar drop down on IE7 helpfully warning me that my security settings do not allow websites to use ActiveX, I had that dread feeling you get when you realise you are not going to be able to do your planned jobs for today, without a lot of extra work.

Sure enough, all of our well crafted JavaScript based sites, clever dancing widgets and client side validation routines have ceased to work for my corporate customers. Even the years old multi-sites search on the TechCo Home Page has ceased to function. IE helpfully displays the search text in the URL querystring, but that is about it!

With a sinking heart I clicked on the log-in link of one of our WordPress blog sites, and attempted to log in. Well success, you can at least log in! Now for the acid test; can you post some information or edit a page? Sure enough, the wizzy icons above the edit window are no longer there. The Visual and HTML tabs do not allow you to flick between views because the other tab is not an active link. We are all Dooooomed!

But wait! The Save Draft facility on the right side appears to be a button. Click it and the reassuring message appears at the top of the screen that the Post has been saved. I can still work! How about the Publish Button? Yes, that works too! Praise be upon those wonderful developers at WordPress who had the foresight to consider the poor sap working a restricted environment with all the Ajax, ActiveX, and other JavaScript goodies turned off.

Think about that, you script kids who shout that a site without JavaScript and on hover events, is a legacy of the dark ages. Sometimes that old HTML Button has a place too!

Installing Google XML Sitemaps on a WordPress Blog

Someone asked me the other day how to install Google XML Sitemaps on a WordPress Blog, and I must admit I had to go and check it out. Actually, it is really easy, so the instructions are listed below. Follow these steps if you use WordPress and are considering installing Google XML Sitemaps:

  1. First Download the Google XML Sitemaps plugin from wordpress.org
  2. Unzip the plugin, then upload the full directory into your wp-content/plugins directory
  3. Use your favorite FTP program to create two files in your WordPress directory (that’s where the wp-config.php is) named sitemap.xml and sitemap.xml.gz and make them writable via CHMOD 666.
  4. Activate the plugin on the plugin administration page
  5. Open the plugin configuration page, which is located under Options, XML-Sitemap and build the sitemap the first time. If you get a permission error, check the file permissions of the newly created files.

That’s it! The plugin will automatically update your sitemap each time you publish a post, so theres nothing more to do.

You should note that Google XML Sitemaps plugin requires WordPress Version: 2.1 or higher.

Making your whole blog directory writable is NOT recommended for security reasons, so make sure you just set the rights on the two files sitemap.xml and sitemap.xml.gz to CHMOD 666. You can find more information about CHMOD and how to make files writable at the WordPress Codex.

Happy Blogging!

Widgetizing Themes

We came across this really helpful resource on codex.wordpress.org which tells you how to fix up your WordPress theme, and make it Widget ready. Widgets are now a standard part of the WordPress install so to reach the broadest audience all modern themes should support them, as well as supporting old style sidebars.

You need to know PHP, HTML mark-up and CSS to benefit from this resource, but if you are in to writing your own WordPress themes, then you probably are up to speed with these anyway. If not you will need to be, so why not get cracking now and learn?

Click here to learn how to Widgetize your WordPress theme