Created
January 8, 2020 10:44
-
-
Save sidouglas/ba3b24906a8a9b2b87990439b0b36424 to your computer and use it in GitHub Desktop.
Add Shortcode WordPress
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
<?php | |
add_shortcode( "[tag]", "your_shortcode" ); | |
function your_shortcode( $atts, $content = null ){ | |
extract( shortcode_atts([ | |
'foo' => 'something', | |
'bar' => 'something else', | |
], $atts ) ); | |
return 'something'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment