php - How to place plugin hook in a wordpress template -
in many wordpress plugins, there instructions place <?php do_action('plugin_name_hook'); ?> in templates.
where code needs placed , should plugin_name_hook?
hooks actions performed @ time. if want custom hook 1.create custom hook in plugin or theme's function.php
add_action('my_action','my_function'); function my_function() { // } 2.and call in template as
do_action('my_action'); and can read more here https://codex.wordpress.org/function_reference/do_action
Comments
Post a Comment