Ask and ye shall receive!
I have been going through the backlog of comments and noted that a couple of people wanted to sort their indexes in chronological order — i.e. they want the list of posts sorted by date with the most recent at the top. So I was just pondering the issue, wondering if I should really add this feature even though it’s not really something AZIndex is designed to do, when I suddenly had “D’oh” moment…
You can already do this with the current release of AZIndex! (By using a one-line custom compare function.)
Here’s how you do it:
Sneaking a Peek at an African Wild Cat
For all you feline fanciers out there, thanks to the new 10x zoom camera I brought for the trip, I was able to snap a photo of an African wild cat as we were being driven from the airport into the game park. Appartently they are quite rare, even though we saw another one a couple of days later. Not as impressive as the big cats they share the African bush with but still, they do take a good photo, don’t they?
I have had a couple of questions about putting an index in the sidebar of a blog so that it is visible on every page. After a bit of testing and fiddling, it turns out that, yes indeed it is possible, and it’s actually quite easy to do. The trick is to use a sidebar widget, and here are the step-by-step instructions on how to do it:
- Log in to your blog and go to Design >> Theme Editor.
- In the Theme Files list on the right you should see an entry called something like “Theme Functions (functions.php).” Click on the link and the file will be loaded into the editor window.
- Now we have to add the following line at the top of the file to enable WordPress shortcodes in sidebar widgets:
IMPORTANT: It must be inside a PHP tag: i.e. somewhere between <?php and ?>
For example, if there is a line containing <?php at the top of the file, then add it on the following line. (Just make sure you don’t put it inside a PHP function). If the file is empty, or doesn’t have those tags, you will have to add them yourself:
- Click Update File at the bottom of the page to save your changes.
- Now go to Design >> Widgets and add a Text Widget to your sidebar.
- All you have to add to the content of the text widget is the AZIndex shortcode for your index. For example, if your AZindex index has an id of 2 (check the AZIndex admin page for the id), add the shortcode:
[az-index id=”2″ escape=”true”]
- Save your changes and go take a look at your new sidebar.
These instructions assume that you are already using a theme with a widget-enabled sidebar. If you do not see the new text widget, then it’s possible you will need to “widgetize” your theme (search for that term on Google for more information). Most popular themes are already widgetized these days.
I have tried this, and it works fine, though obviously there isn’t much room for large entries in your index. There is one site I know that is using this trick to display an index of movies in their sidebar. If you try this yourself and have any questions, just leave me a comment.
A leopard feeding on an what’s left of an unlucky impala
This was one of the highlights for our stay in the Kruger. We sat and watched for about 30 minutes as the leopard tucked into a meal of very rare impala steak. Not only that, but there was a hyena sniffing around below the tree waiting, in vain, for something to drop from above. And I’ll tell you something, those hyenas are huge! People tend to think that a hyena would be no match for a leopard, but in truth it’s quite the opposite. If the leopard had been on the ground with that kill, it would have easily been driven off by the lone hyena I snapped at the foot of the tree.
The Hopeful Hyena
Sunrise over the Kruger National Park
Apologies to everyone who has been waiting for answers to their questions. No excuses — just action to make up for lost time. I will be going back though all the comments and catching up as quickly as I can.
I will also be posting select photos from my summer vacation to South Africa. It’s a beautiful country and the people we met, of all races, were nothing but kind and generous. They are still struggling with the after effects of decades of segregation and injustice, and I can only hope their leaders act wisely and bring peace and prosperity to their country.
The wanderer returns!
My apologies for not attending to the questions, suggestions, and comments left on my blog in the past three weeks or so, but there was a very good reason for my absence… I was having way too much fun on vacation in South Africa and Mauritius with my sister and her wonderful family. The highlight of the trip was undoubtedly our stay at the Ngala Private Game Reserve on the border of the Kruger National Park where we were treated like royalty and given the experience of our lives on safari in the African bush.
As a taster of what we saw, here are photos of the legendary “big five”.
First, a female leopard and her cub. This amazing photo was snapped (I think) by my sister, so I can take no credit for the captured moment.
Unfortunately lions were a little scarce in the game park while we were there, but we managed to intercept a couple of male lions before they vanished into the Kruger in pursuit of their pride.
Bull elephants we saw plenty of… this one in particular, and thereby hangs a tale (but it will have to wait for another day of two).
We caught up with a rhino family just as the sun was setting over the park.
And finally, we only caught a glimpse of the water buffalo which, thanks to megazooms and megapixels, seems a lot closer than it actually was.
Plenty more photos where those came from, but I promise not to post all 2,000 of them!