Home About the Book About the Authors Handy Links

Creating a favicon.ico File

Maria.

Ever wonder how some Web sites put their own custom icons in the address bar of the Web browser window when you visit them? Or, if you read your site’s Web logs, why there are so many requests for a file named favicon.ico that you might not have?

As you might have guessed, these two questions are related. The tiny image that appears in the address bar is displayed from the favicon.ico file that should reside in the root directory of your Web site.

There are a number of Web sites that make it easy to create this file based on an existing image, using a Web interface. The one I like is on the chami.com Web site, at http://www.chami.com/html-kit/services/favicon/. Chami is the maker of HTML-Kit, a “standards-compliant, full-featured and multi-purpose development environment for editing HTML and other Web-related file types.”

Click a browse button to find the image you want to convert to a favicon.ico file and select the file. Then click the Generate FavIcon.ico button. In moments, the image you chose is converted into the proper format and ready to download. Copy it into your Web site’s root directory and add a bit of HTML code to the HEAD section of your Web pages (or the header.php or index.php file in the active theme of a WordPress installation — whichever file has the HEAD section). The next time you load the page, the image will appear.

Note: You can find step-by-step instruction for setting up a favicon.ico file with your WordPress blog in our book, WordPress 2: Visual QuickStart Guide. That’s why I don’t go into more detail here.

Case sensitive WordPress install

Miraz.

Hooo, boy! Sometimes I just can’t let things rest. I have the new MacBook Pro. The other day I started up PHP and installed MySQL, following various arcane instructions about starting the MySQL server and whatnot, then set up to install WordPress. I’ve done it dozens of times before — installing WP is quick and easy — except this time it wasn’t.

I knew the MySQL server was running on my Mac; I could connect with CocoaMySQL-SBG-v0_7_1 and the Terminal. I had created a table just for this WP install and could see it.

WordPress however just rabbited on about not being able to connect and checking my settings in wp-config. Yup, double yup. Everything was bang on; it just wouldn’t work.

I Googled; I consulted the forums; I ‘read’ the help at the MySQL Reference Manual. I typed strange commands into Terminal. Nothing helped.

Until, finally, something tickled the back of my brain and in wp-config I changed my ‘localhost’ to ‘Localhost’ — with an uppercase L.

And now, as usual, that famous ‘five minute’ install takes only one minute. Up, running, ready to go.

Comments Off

Displaying All Categories Check Boxes in the Write Post Window

Maria.

If you have more than a handful of categories in your WordPress blog, you may have noticed that the Categories check boxes in the Write Post window has a scroll bar. You’ll need to scroll down every time you want to check a category at or near the end of the list.

This is a pain in the butt. At least it is for me. So I did something about it. You can, too.

  1. Use your favorite text editor (I use TextWrangler on a Mac) to open the wp-admin.css file in the wp-admin folder in your WordPress directory.
  2. Locate the line that starts
    #categorydiv div div
  3. Change the value (12em) in the line that says
    height: 12em;

    to a higher value. I entered 40em (I have 27 categories).

  4. Save the wp-admin.css file back in its directory.

Now open a Write Post page. You’ll see your change immediately.

Of course, this doesn’t work with a WordPress.com blog. You need a server installation to fiddle around with admin files.

Comments Off

The backup tip you shouldn’t need

Miraz.

I’m roaming around a few WordPress plugins while I write that chapter for the WordPress Visual Quickstart Guide. In the course of things I noticed my copy of Ryan Duff’s invaluable Contact Form was out of date. Then I realised I just had my email address on one tips page instead of the form. In the process of updating the page I deleted all the content and pasted in the wrong stuff. As you do, when you’re an idiot and not paying attention. Sigh.

This isn’t the first time I’ve committed such idiocy though, so I instantly turned to my good backup friend Google, who of course has my pages in the cache. I did the relevant search, located the correct HTML from viewing source of the cached page, and was up and running again more quickly than rummaging around on my hard drive for the file I saved this morning while testing the backup plugin.

Of course, if you actually follow the advice we give in the book about backing up before you edit files then you won’t be needing a tip like this.

Comments Off