Button Shortcode
// Add Shortcode function button_shortcode( $atts ) { // Attributes $atts = shortcode_atts( array( 'url' => 'https://google.com', 'class' => 'btn btn-primary', 'target' => '_self', ), $atts ); return '<a href="' . $atts['url'] . '" class="' . $atts['class'] . '" target="' . $atts['target'] . '">' . $atts['label'] . '</a>'; } add_shortcode( 'button', 'button_shortcode' );