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

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -