/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// FOR THE FUNCTIONS.PHP FILE >> function do_my_shortcode( $atts, $content = null ) { return '<div class="something">' . $content . '</div>'; } add_shortcode('shortcode_label', 'do_my_shortcode'); // TO USE THE SHORTCODE >> [shortcode_label]My Caption[/shortcode_label]