WordPress’s ‘Pretty Links’

Another WordPress posting – this time about links. Although I’d heard some of this before, this forum made some good points about Permalinks with question marks in them.

(Permalinks? Short for permanent links, they’re the links that point to blog articles, even after they’ve moved off the main page – hence, permanent. They’re also the ones you should use when referring to another blogger’s articles).

Basically, links can be something like:

   bigbizblog.com?my-article

or this (sometimes called ‘pretty links’)

   bigbizblog.com/my-article

The difference is that, while Google is quite content to index the second version, the jury’s out as to whether it will handle the first format, with the question mark.

According to some, the question mark makes the path look like a search query (rather than an actual page), and Google tends to avoid those. Whether that’s true or not, as you start your blog, investigate the alternative format, and set it up if you feel it’s worth the while.

In WordPress, this involves the Options/Permalinks section. It’s rather detailed, and will require some fiddling with your server internals (and likely a tour through WordPress’s docs).

Is it worth it? I have no proof, but some of the posts on that forum are from people experiencing indexing issues with search style links (no Google indexing beyond the first page), so I’d hazard a cautious yes.

Unfortunately, this is yet another item well worth doing right away – otherwise you’ll break the links to all your current articles. So a little time spent early on is well worth it to prevent this.

Seth Godin Tells Us What Makes a Good Blog – Maybe…

Seth Godin (of Big Red Fez fame) writes about the CEOs and blogs. His take is that ‘Blogs work when they are based on: Candor, Urgency, Timeliness, Pithiness, Controversy’. And he feels that four out of five are necessary to succeed.

I disagree. Of course, I’m not important, and Seth is – but it’s my blog, so here are my reasons:

Controversy: Frankly, I don’t believe a blog has to be controversial. Breeding controversy is like those ads that offend everyone, but get talked about. Congratulations, the company is known, but not liked.

Likewise, ads (and blogs) that imply urgency beg the question – what happens if I don’t act now? For a blog, just look in the archives for the article. So much for urgency.

As for pithiness, I believe it’s needed, but it shouldn’t be. Look at how-to books (especially computer books) – the larger ones sell as well (or better) than the smaller ones. And how about novels – the most popular ones often come in the hundreds of pages.

But on blogs, we’re expected to be pithy to the point of being cryptic – even the Google item I recently mentioned shows that shorter entries are preferred (and, we can expect, rewarded). Perhaps for a personal item short is good, but if you’re teaching, you take the words you need to develop the topic – no less.

For business, timeliness is also a problem. I think topical and timely is a great way to get noticed. But business blogs also need to be timeless – write articles that stand the test of time, and get you visitors. Otherwise, your work becomes a ‘loss-leader’ – you risk spending your best efforts to get people to the store, with nothing substantial for them when they get there.

But I do agree with him on candor. I think the appearance of a hidden agenda can kill readership quickly. And business blogs need to be especially careful – after all, a blog is a chance to develop a rapport (and let’s be honest, possible work, sales, or P.R.), and any hint of deception will be as annoying as a friend talking behind your back – possibly worse.

But whether you agree or disagree on these points, talking about them does one thing: it helps solidify what you want in your blog – so take the time to decide what you’ll focus on.

Easy RSS, Blogs, and More WordPress

I found another kink in WordPress’s setup (see how much time my mistakes are saving you?) – RSS feeds.

(RSS feed you say-what are they? Here’s the quickest intro to feeds I can think of:

  • Download and install the FireFox browser, and then install the Sage RSS plugin.
  • Then come back to my site here, and open Sage (ALT-S or the Tools/Sage menu option in FireFox).
  • Click on the button on my page that says RSS 2.0, and drag it to the top of the Sage list of feeds – and drop it.

That should register you – now without visiting my site, you can double click on that entry, and get my latest thoughts – and the thoughts (and feeds) of anyone else you care to put on that list.

Now back to WordPress – it has settings to control what text is presented in that feed – make sure you adjust these settings right away for your own blog:

  • Tagline – what your blog is about – it should reflect your blog ‘theme’.
  • Options/Reading/Reading Options/Syndication Feeds – adjust these to show what you want sent out – but MAKE SURE you set it to ‘show summaries’!

Why summaries? herein lies the big secret of blogs for business.

Ready? Come a little closer…

You’re likely writing a blog to get traffic – and if they don’t have to visit your site to read, what traffic will you get?

It sounds simple, but it’s important. I have one blog I read regular that I don’t have to drop by for – his RSS feed has everything in it. The result is I don’t visit, I don’t see his latest ads and offers – and I’m not inclined to.

Of course, I may go around once in awhile – but it’s less often. You want more traffic, not less. And that is why you offer summaries, not articles. Repeat: make sure you use summaries.

Oh, and one more thing – in WordPress, when you post, always write an excerpt – if you leave it off, you’ll still get your whole article posted on the RSS feed anyways, and no visitors. With an excerpt, you’re selling the sizzle, not the steak, and you’ll likely get more visits.

Of course, this means you need to make your entry title and excerpt attention grabbing, but that’s another blog entry…

The Joy of Writing vs Making Money

The first week, and already I’m missing posts…

Actually, I have two good reasons for skipping yesterday – the first one was that I actually had too much to say. Wrote it all down, found it too spread out to make a cohesive entry, and mothballed everything so I could spread it out over time.

This wasn’t laziness or vanity – according to a seminar I heard about ‘second hand’ (where all the best rumors come from), Google likes web pages of a certain length – currently around 200-300 words. A year ago, 700-800 was consider fine (of course, I could already tell that less was better: I have articles with AdSense on them, and shorter ones usually end up better targeted).

The second reason was money-oriented – I’ve been working on my paying sites, in particular Gift-Cal.com and byGwen.com, my wife’s art site.

I already described the PHP for rotating a series of pictures – but I also worked on a catalog/shopping cart style code in PHP. Each shows catalog images/thumbnails of the products (calendars or artwork) – you can click on it to view more detail, and order by PayPal.

The result is a couple of small, light sites, with PayPal payment processing (instead of a merchant account), no need for a db backend, and a single easy to maintain file for data (image name, title, description, price, as well as id and category numbers).

Besides a great workout in PHP (I’ve only just started it this November), it was an opportunity to tailor a site the way I wanted, rather than try to fit my model into a prebuilt solution. There’s still more to do behind the scenes (right now, I edit the data file by hand, instead of creating an Admin section to handle it), but it works, and I like the result – you can of course drop by byGwen.com and Gift-Cal.com and see if you agree.

Glue Time (PHP Multiple Image Rotator)

Rather than blog chores, it was back to regular work – I’m currently reworking one of my sites, Gift-Cal.com, making it more attractive to visitors (ie. buyers). In line with that, I decided to do a little random image code in PHP to showcase products.

One problem – most rotators are truly random, and if you do more than one image per page, you could get duplicates. I wanted a row of images, and no dups, so I had to roll my own.

Here’s the code for ‘rotate.php’– feel free to customize & plug it into your site (but please keep the copyright in it):

<?php
// rotate images randomly but w/o dups on same page - format:
// <img src='rotate.php?i=0'> - rotate image #0 - use 'i=1'
// for second, etc
//  (c) 2004 David Pankhurst - use freely  but please leave in my credit
$images=array( // list of files to rotate - add as needed
  "img1.gif",
  "img2.gif",
  "img3.gif",
  "img4.gif",
  "" ); // last entry left blank - easier to maintain list this way
$total=count($images)-1;
$secondsFixed=10; // seconds to keep list the same
$seedValue=(int)(time()/$secondsFixed);
srand($seedValue);
for ($i=0;$i<$total;++$i)
{
  $r=rand(0,$total-1);
  $temp =$images[$i];
  $images[$i]=$images[$r];
  $images[$r]=$temp;
}
$index=(int)$_GET['i'];
$i=($seedValue+$index)%$total;
$file=$images[$i];
header("Location: $file");
?>

To use, place your image files into the array (with paths if needed), and use the <img src=’rotate.php?i=0′> invocation on your web pages. Use ?i=1 for the second image on the page, ?i=2 for the third, etc, as needed.

The code doesn’t need any explanation to work – but that won’t stop me. The key is pseudo random numbers. As long as I use the same seed value each time, the function call will return the same randomized sequence. Passing i=0, i=1, etc gets me the appropriately indexed entry from the list. As well, since the list is in turn shuffled, the result is a random, but not repeating, series of images.

(And before I get comments, I wrote my own shuffle because I didn’t like the randomness of PHP’s shuffle() – you can replace it if you wish).

The only other item to note is the $secondsFixed value – I didn’t want the random value changing too often (with time() it would change every second), since that could cause the list to resequence between the first call on the page and the last, resulting in the dreaded repeating images. This factor reduces the chance of that happening, and can be adjusted to suit (it also determines how often the images ‘stay’ in their current configuration).

To see it in action, drop by the Gift-Cal.com and check out the top row of images on each page.