Created
November 18, 2022 13:22
-
-
Save AndreFCAmorim/925ab8d811736c9c5a3835471334c97e to your computer and use it in GitHub Desktop.
Create a shortcode in WordPress
This file contains 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
<?php | |
add_shortcode('your_code', 'my_function'); | |
function my_function() { | |
$message = 'Hello world!'; | |
return $message; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment