WordPress Hooks – Introduction


When I hear this word, I can imagine all kind of websites, in fact I have developed so many types of websites so far.

But have you ever think on why wordpress have received very much popularity? Yes or No? As per me there are two main factors to gain very much popularity.

  1. Online Documentation
  2. Regular Feature Updates

We can understand that a very good online documentation is very much required to make any software/platform a success and that is what wordpress have done very carefully. So that is the one of the reason (as per me) for wordpress’ success story.

Now let’s move to the second reason which is “Regular Feature Updates“. I would say that nothing is perfect in first release and we will have to keep ourselves updated to keep our shoulders in parallel with world. :)

So that is what wordpress doing very well since long. At every few months you will find a Yellow Notification in your admin panel about the new version is available.

But have you noticed that when you upgrade the wordpress from the admin panel your customization to the theme and plugins keeps working as it was before upgrade unless you have modified the wordpress core files.

So what is the Mastermind behind this??? Any guesses??? I would say HOOK is the Mastermind behind this. There must be many more things behind wordpress’ success but I would say HOOK makes a wordpress very flexible at any level. So let’s have a quick introduction for the WordPress Hooks.

WordPress Hooks – Introduction

As the name suggest Hook means Placing something in between something which is already in place. In wordpress we will do the same thing with the Hooks, We can hook our own code in between core code. WordPress team has already done provision so we can hook our code. Isn’t it interesting????

Let me give you few example of the possible hooks we can have in wordpress.

  1. Sending a mail to all registered users when new post is added
  2. Get Author name in UPPERCASE
  3. And many more……

There are two types of Hooks available in WordPress. Which are as below:

  1. Actions
  2. Filters

This was the Introduction to the WordPress Hooks, in upcoming article we will see about Action and Filter in details. In next article we will learn about Action Hooks in wordpress. Stay tuned for the updates.

Subscribe to our RSS Feed by email to get all the updates directly to your email and yes don’t forget to Follow us on Twitter and Like us on Facebook.

Related Posts

Written by Avinash

Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.

View all posts by: