[Video]—A Beginner’s Guide To Using WordPress Hooks

Web-designers-toolkit

WordPress is one of the most user-friendly CMSes out there. And one of the reasons of WordPress’s popularity are the themes. You can customize these as you like and make WordPress truly yours…

However when you come across issues you need help. And there certainly is a learning curve involved. Sometimes it’s easy to get help and sometimes it just a long wait. Also most of the beginners come from a non-technical background.

Once you receive help you move on and then again you stumble across a hurdle and you need help again. Such help does get you going but does not make you a problem solver in the long run.

Also it so happens that we try to avoid code since that makes us uncomfortable. But the fact is that if you want to become a real developer some day, you’ll have to get into the code because there’s no software that can replace code.

Expectations from this video

My attempt with this video is to share some tips on how you can get into the developer mode yourself. Because as the adage goes… give a man a fish and you feed him for a day; teach him how to fish and you feed them for a lifetime. Hopefully this video will not only set you on the road to become a WordPress ninja, you’ll also be in a position to help others and share your expertise. You’ll be in a position to take control of things and get to the next level. You’ll never need to ask how to do a specific thing in a specific theme or child-theme. All themes are different by looks but built on the same base of WordPress and PHP.

During this video you’ll see how I did things when I was starting out and you can provide feedback in the comments so that I can learn a thing or two from you. Since this is for those starting out with WordPress and Genesis and the child-themes I’m going to stay away from advanced and sophisticated ways of doing things. That could be a video for later.

Common Problems

  1. How do I so and so thing with this child-theme?
  2. What does this piece of code do?

There are two ways to change or modify a theme to tweak the functionality. This could mean adding, removing or just altering something.

The first way is to edit the files themselves. (You may need to create a child-theme so that your changes are not overwritten when the theme is updated). The other way is to use WordPress hooks.

What is a hook?

A hook is like an event that happens. And you can tell your code to do something specific when that even occurs. It’s like saying open the door when the doorbell rings. In this case the hook is the ringing of the doorbell and the action to take is to open the door.

There are two types of hooks:

  1. Action Hooks– These allow you to execute your custom functions when they execute.
  2. Filter Hooks– These allow you to filter certain content or variables.

 

 

Divi WordPress Theme