How to add custom hook in WordPress? asked Feb 11, 2021 in PHP by Pantycle_Genefanty (16.3k points) 0 like 0 dislike 111 views How I can to add custom hook for own theme in WordPress CMS? wordpress add hook to theme wordpress hook action plugin cms dev web Please log in or register to add a comment. 1 Answer 0 like 0 dislike answered Feb 11, 2021 by Pantycle_Genefanty (16.3k points) You can do it in 3 simply steps: Add hook function in theme "functions.php" file and in it call hook action: function custom_hook_fnc() { do_action('custom_hook_title'); } Add hook function in needed place of theme template: <?php custom_hook_fnc(); ?> Add custom function in plugin or child theme and tell action for call it using hooks: function display_something() { echo '<p>Test display custom hook text.</p>'; } add_action('custom_hook_title', 'display_something'); Please log in or register to add a comment.