{"id":5865,"date":"2016-11-20T05:23:14","date_gmt":"2016-11-20T13:23:14","guid":{"rendered":"http:\/\/wpbeaveraddons.com\/?p=5865"},"modified":"2016-11-20T05:30:14","modified_gmt":"2016-11-20T13:30:14","slug":"wordpress-hooks-beaver-builder-theme","status":"publish","type":"post","link":"https:\/\/wpbeaveraddons.com\/wordpress-hooks-beaver-builder-theme\/","title":{"rendered":"A Lay Man’s Guide to WordPress Hooks & Beaver Builder Theme"},"content":{"rendered":"

Hooks are one of my favorite WordPress Features. It allows developers to easily extend the code. When I first started WordPress development, I had not idea what a “Hook” meant.\u00a0So, here’s my post describing what a Hook means and how useful it is.<\/p>\n

What is a WordPress Hook?<\/h3>\n

Instead of writing a technical jargon, I will keep it simple. We all have a Wardrobe and every wardrobe consists of hangers, hooks, racks, and drawers. Why do we use Hooks? We use hooks to hang our clothes and\u00a0arrange them.<\/p>\n

\"Hook\"<\/p>\n

We use Hooks in our Kitchen to hang \/ organize stuff too.<\/p>\n

\"Hook\"<\/p>\n

Or we can use them to hang a picture in our living area.<\/p>\n

\"Hook\"<\/p>\n

Does that give you a hint?<\/em>
\nHooks are used to “add\/insert\/move\/organize” our stuff. The same is used for WordPress too.\u00a0Hooks are the places inside the existing theme \/ plugin code where you can inject your code.<\/p>\n

WordPress Hooks in Beaver Builder Theme<\/h3>\n

Beaver Builder theme provides several hooks\u00a0allowing you to easily add your custom code in various locations. Davinder at Pro Beaver has put up this amazing Visual Guide<\/a>\u00a0which exposes all the WordPress hooks present in Beaver Builder Theme and their locations.<\/p>\n

\"beaver-builder-theme-hooks\"<\/p>\n

How to use a WordPress Hook?<\/h3>\n

Now that we know what a WordPress\u00a0Hook<\/strong> is and how useful it is. Let’s take a look at how we can use it.\u00a0To use a hook, we need to first create a PHP function. It\u00a0can be something like this<\/p>\n