Turning address bar into a WordPress command line
I searched for this but couldn’t find a specific reference to all this in one place. What this actually reiterates is that most geeks are lazy. They’d rather practice it than document it somewhere. Ask any coder how he or she hates writing documentation. In that sense, I have a lot of respect for the contributors of Codex, who have put together a wonderful repository of WordPress reference. It might be a good idea to include this in Codex probably under a sub-section: How to nuke a WordPress blog with a command line =). No, I’m kidding, replace ‘nuke’ with ‘probe’.
It’s been a while since I wrote about WordPress, so I thought I’ll turn this post into a WordPress exclusive, just before WordPress brings on more mojo with ver 2.0 scheduled to be released very very soon.
WordPress—as a software—has something for everyone. It appeals to both the end-users as well as geeks alike by letting them choose their poison (as in features). One such highly underrated but extremely efficient way of accessing your WordPress blog—or for that matter anyone else’s—is by turning your address bar into a WordPress command line1. Here’s how:
Type Alt+D. The cursor lands at the address bar waiting for your “command”. Go on, type the address of a WordPress powered weblog and press enter (I’m in a “don’t disturb the sleeping mouse” mood).
http://www.somesite.com/
The site loads-up. Nothing great happening there. Now, you want to go to the next page. So, you start looking for that link at the bottom that says “Next Page” or “Previous Page”. Stop. Don’t bother. Instead try this:
http://www.somesite.com/?paged=2
In the same manner, if you want to look at page 10,
http://www.somesite.com/?paged=10
After a bit of browsing, you now want to search for “something” on the WordPress powered blog you’re browsing. But you’re dismayed to find that there’s no search bar. Well, you don’t need one. Simply turn your address bar into a search bar like this:
http://www.somesite.com/?s=something
If you’re looking for “something good”, try the following:
http://www.somesite.com/?s=something+good
But, unlike Google treating it as a phrase, WordPress just looks for single words “something” and “good” within a post and lists them if found. If any WordPress guys are reading this, may be we could have this as a feature?
My archives says that I have 35 categories. I want to look at posts from a random category, say 20. Easy peasy:
http://www.somesite.com/?cat=20
I also have posts from 2001 to 2005. Just for the heck, I want to read what I was thinking in the month of December, 2004. So here’s what I do:
http://www.somesite.com/?m=200412
Going another step, I want to know what I was thinking on a particular day of that month, say 25th:
http://www.somesite.com/?m=20041225
If there are any entries for the day 25 December 2004, they’ll be listed.
Now, you’re a feed warrior and want a specific type of feed say: rdf, here we go:
http://www.somesite.com/?feed=rdf
All of these work irrespective of whether you have permalink structure defined or not. See what I mean when I said WordPress impresses the geek as much as the end-user?
What we might otherwise think as ugly characters in the address bar are in fact beautiful, help get-things-done and really useful. Kudos to the WordPress team for getting this in order right from day one. They’re now catering to the niceties and low-tech blogging =).
So, if you’re a die-hard command line warrior and a WordPress user, this one’s for you. And the next time you go surfing on your favorite WordPress blog, don’t bother looking for archive pages or a search page, just remember these commands.
Update: I was looking for some more variety in letting the user manage how he wants to read the feed. My requirement was to serve full content, but let my user decide what he or she wants: full content or a summary. Hackers to the rescue. Within an hour of posting this to WordPress hackers, Mark Jaquith provided an extremely simple and highly usable solution. I’ve saved the plugin file for download (Upon downloading, rename it to feedtype.php, upload to your plugins folder and activate it).
Usage:
For full content, use either default or the following:
http://www.somesite.com/?feedtype=full
For summary of content (excerpt):
http://www.somesite.com/?feedtype=excerpt
All credits to Mark for this extremely usable feed plugin. Thanks Mark!
- This is applicable generally to WordPress powered blog sites, and may or may not work with sites that are not essentially blogs, but use WordPress as a hacked CMS. Nevertheless, there’s no harm trying. [←]
I guess a *fanstastic* extension of such command line will be to combine them with firefox’s bookmark keywords. As the bookmark keywords can take command line arguments and expand them, we can even make these commands shorter and flexible.
Dec 22, 05 at 05:36Kousik: The beauty of surfing a WordPress powered blog by using these commands is that you don’t have to be browser specific (Firefox or any other).
Dec 24, 05 at 04:29