Skip to content

Instantly share code, notes, and snippets.

@saroarhossain57
Created November 29, 2016 12:55
Show Gist options
  • Save saroarhossain57/f0511921e48023228d26bfede01b7839 to your computer and use it in GitHub Desktop.
Save saroarhossain57/f0511921e48023228d26bfede01b7839 to your computer and use it in GitHub Desktop.
function btn_shortcode($atts, $content=null){
extract(shortcode_atts(array(
'type' => 'theme',
'link' => '#',
'text' => 'btn theme'
), $atts));
return '<a class="btn btn-'.$type.'" href="'.$link.'">'.$text.'</a>';
}
add_shortcode('btn', 'btn_shortcode');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment