Today it’s time for another edition of the “WordPress Advice of the Month” monthly series, which isn’t really monthly, by the way. (Here’s the previous episode, in case you missed it: Why Free Themes are EVIL)
For those of you who don’t know, WordPress hacks are various things you can implement that change the standard way of how WordPress works. It usually involves some PHP, HTML, or CSS coding.
The positive thing is that WordPress is very hack-friendly by nature. That’s basically what functions.php files, and various other structures and programming nuances are for. And the most obvious indicator of them all – the sole existence of these things called plugins.
All of this confirms that WordPress encourages everybody to play around and change the way a standard installation operates, so it can better fit each individual webmaster’s needs. This is one of many reasons why WordPress is THE leader in today’s world of blogging software.
Over the years hundreds of hacks have been invented. PHP hacks, HTML hacks, CSS hacks, JS hacks, security hacks, usability hacks, the list goes on. And many of them are really really cool and highly popular. As a matter of fact the blog you’re reading right now uses at least 10 hacks (I can’t remember exactly).
Without further talk let’s just take a look at the piece that has reminded me of the importance of WordPress hacks. This has been recently published by the guys at Onextrapixel:
The headline is pretty self-explanatory. It’s a compilation of some of the coolest WordPress hacks. Ones that make the list are:
- How to Display Adsense to Search Engine Visitors Only
- How to Display Dates as “Time Ago”
- Display an Incrementing Number on Each Post
- Style Comments Based on User Roles
- How to Add a Login Form Anywhere In Your Theme
- How to Show Related Posts Without a Plugin
- How to Style Posts Individually
- How To Add Bio Info To Your WordPress Blog Posts
- Creating Automatic Short URLs with Bit.ly
- Create an Ajax-based Auto-completing Search Field
So here’s the big question:
Do you really need hacks?
Here’s something for a WordPress advice… I truly hate giving this answer, but – it depends. You have to decide for yourself. There’s really no one-size-fits-all type of a solution. Here’s what I mean:
Let’s take a look at this one: how to display dates as “time ago”.
It’s not particularly more readable than the standard way of displaying dates. So why would you want to do this? Well, some people consider it simply cooler. Other reason could be that this way of displaying dates becomes a trend on the internet. Sites like Twitter, Digg, and many others are using it. The only difference is that your blog is not updated every 2 seconds. Probably something more like every 2 days. That means that there’s not going to be a lot of situations when a visitor actually sees a message like “published 6 seconds ago”.
(By the way, in my opinion displaying dates is something you don’t really need to be doing at all for each individual post. What’s the point of notifying the reader that what they’re about to read is probably outdated?)
So do you need those hacks? In a word, no. But… do you want to have them? Well, that’s a totally different story, and it’s up to you to decide. Some people will try to convince you that some of the hacks are absolutely crucial to have, which isn’t true. Here’s the thing, the only things that are crucial to have have already been implemented as parts of the standard WordPress package, or are provided by the most popular plugins. Hacks are only a sort of icing on the cake.
How to use WordPress hacks
The most popular way of creating and using a hack is to edit the functions.php file of your current theme. You can do it right from your admin panel or by downloading the file via FTP and editing it in your favorite source code editor.
Source code is a big and scary-sounding phrase if you’re not a programmer, but don’t worry. In most cases you don’t have to know anything about programming in order to activate a hack. The instructions that go along with each hack are usually very detailed, so everyone can easily activate them. However, you do have to make sure to follow these instructions exactly, word for word. Otherwise, things can get bad. Which brings me to my next point…
It’s a good idea to make a backup copy of your functions.php file (or any other file you intend to modify) before you start playing with it. Then you can always go back to the previous version in case something goes wrong.
Other equally cool WordPress hacks
There’ve been hundreds of posts written on this topic, here’s a handful that my delicious.com profile tells me to share with you:
- 10 Techniques for Customizing the WordPress Admin Panel
- Separating Trackbacks from Comments
- 25+ Extremely Useful Tricks for the WordPress Functions File
- 10 Useful WordPress Security Tweaks
- Top WordPress hacks of 2009
- 10 Useful WordPress Coding Techniques
- 10 Handy WordPress Comments Hacks
- 15 Killer Hacks for WordPress that Are Extremely Useful
- 10 useful WordPress theme hacks
- A to Z of WordPress .htaccess Hacks
I have a task for you. Check out some of the sites above (and the aforementioned post by Onextrapixel), choose your 5 favorite hacks and tell me which ones they are. I’m really curious about this.
One more thing. Here’s how to add “nofollow” to non-homepage blogroll links. In WordPress, of course.