Last active
August 29, 2015 14:09
-
-
Save chrisblakley/9750fa99325f63c6539d to your computer and use it in GitHub Desktop.
Example shortcode function
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_shortcode('yolo', 'gearside_yolo_shortcode'); | |
function gearside_yolo_shortcode(){ | |
//Code will go here... | |
} |
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_shortcode('yolo', 'gearside_yolo_shortcode'); | |
function gearside_yolo_shortcode($atts, $content=''){ | |
extract(shortcode_atts(array('class' => '', 'style' => ''), $atts)); | |
//More code will be here... | |
} |
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_shortcode('yolo', 'gearside_yolo_shortcode'); | |
function gearside_yolo_shortcode($atts, $content=''){ | |
extract( shortcode_atts(array('class' => '', 'style' => ''), $atts) ); | |
return '<div class="gearside-yolo-shortcode ' . $class . '" style="background: blue; color: white; ' . $style . '" >' . $content . '</div>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment