Remove a WordPress action in child theme

Eneko
enekochan
Published in
1 min readJan 9, 2016

If you want to remove a WordPress action that was added in the parent theme like this:

function fusion_insert_og_meta() {
...
}
add_action( 'wp_head', 'fusion_insert_og_meta', 5 );

It’s VERY important to use the same priority value in the remove action in case a different value from the default (10) was used:

function remove_parent_actions() {
remove_action( 'wp_head', 'fusion_insert_og_meta', 5 );
}
add_action( 'init', 'remove_parent_actions' );

Ref: http://themeshaper.com/2009/05/25/action-hooks-wordpress-child-themes/

--

--