Forked from cobaltapps/freelancer-basic-add-action-example.php
Created
March 7, 2019 02:06
-
-
Save DalavanCloud/39552379d782c72c3ebcafdeb4f39b36 to your computer and use it in GitHub Desktop.
A basic example of how to add_action a custom function into a specific hook location.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'theme_hook_before_content', 'my_custom_text' ); | |
| /* | |
| * Echo some text inside a function and then hook | |
| * that function into a specified hook location | |
| * using the add_action WordPress function. | |
| */ | |
| function my_custom_text() { | |
| echo 'Hello World!'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment