how do hooks work?

So here's the thing,

i was put on a project made by some guy from the internet.

the thing is he used some procedural programing so basically he made functions in functions.php.

now for some reason these functions run as they wish althought they are summoned on specific templates.

So i made some hooks for them, the problem is something is blocking the do_Action from running.

Has anyone else had problems on running hooks on specific times? or do i have some server error?

Thanks

2 Comments
  1. do_action is kind of defining new hooks.

    add_action actually runs the hooked functions from either a set of prefined hooks (init, wp_head, etc.) or the ones you defined in do_action.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer