Created
September 13, 2017 17:54
-
-
Save cobaltapps/6116cfb2211924b6110a70ca8154a6b9 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