Skip to content
Reference

WordPress Hooks Index

A searchable index of WordPress actions and filters: the add_action or add_filter signature, when each fires, the source line, examples and common mistakes.

64 hooks, each with its add_action or add_filter signature, when it fires and the file and line that call it. Most also have a code example and a note on the mistake that catches people out.

Every entry was read from the WordPress 7.1.4 and WooCommerce 11.2.2 source on 2026-11-16. The examples were checked against that source. Most were not run on a site; where an entry says “in our test”, that behaviour was run in WordPress Playground on the date given. WordPress has thousands of hooks; this is a selection for everyday theme and plugin work.

An action runs your callback at a set point and ignores what it returns; a filter passes your callback a value and uses whatever it returns. In a signature such as add_filter( 'style_loader_tag', 'my_callback', 10, 4 ), 10 is the priority (lower numbers run first, and 10 is the default) and 4 is how many arguments your callback receives (the default is 1).

64 of 64

Lifecycle 5

#

#

#

#

#

Enqueue & assets 11

#

#

#

#

#

#

#

#

#

Content 4

#

#

#

#

Posts & queries 9

#

#

#

#

#

#

#

#

#

Images & media 9

#

#

#

#

#

#

#

#

#

Admin 10

#

#

#

#

#

#

#

#

#

Users & auth 3

#

#

#

REST, AJAX & cron 8

#

#

#

#

#

#

#

#

Comments 2

#

#

WooCommerce 3

#

#

#

Put these hooks to work

Sources

Every signature, argument count and "Called in" line was read from the release packages below on 2026-11-16. The examples were checked against the same source. Most were not run on a site; where an entry says "in our test", that behaviour was run in WordPress Playground on the date given. Each "Called in" line links to that file and line at the 7.1.4 tag of the WordPress mirror on GitHub, or the 11.2.2 tag of the WooCommerce repository.