WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

New to wordpress here. The concept of actions/filters in and of itself is not too difficult to grasp. What I am overwhelmed by is the HUGE amount of actions and filters available. When I am looking at tutorials/guides, they say "simply add this function to the wp_head action or after_setup_theme". Without these tutorials, how on earth would i know to hook that function to that action?

As a beginner, how the heck would i know what is the appropriate action to hook on to? Any advice on how to navigate this? Thanks

share|improve this question
up vote 2 down vote accepted

Take a look at Mike's answer to a similar question more specifically the plugin he posted there can be used to create a list of all action hooks and filters that were called to generate that page in order of execution.

share|improve this answer

The best way to learn the most important filters is to read the source code. Whenever you want to change the output of a function read its source. Then you’ll either find the hook in this function or in another function called by the first. In some cases there is no hook and you have to hack … but that’s the next level.

There are some tools to inspect hooks, and you will write your own probably sooner or later. But nothing beats reading the source.

share|improve this answer
And as a quick tip to others coming across this... here's what I do: I keep a mirror of the Wordpress git repository on my machine, and when I want to find a hook... fire up a command prompt and git grep till I get what I want – Tim Malone Apr 15 at 10:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.