Divider shortcode

Posted on: October 13th, 2022
By: Tadeo Martinez

function divider_shortcode( $atts, $content = null ) {

	$a = shortcode_atts( array(

		'class' => '',

		'style' => ''

	), $atts );

	return '<div class="divider ' . esc_attr($a['class']) . '" style="' . esc_attr($a['style']) . '"></div>';

// [divider class="" style=""]

}

add_shortcode( 'divider', 'divider_shortcode' );

Have any questions or comments? Write them below!


Leave a Reply

Your email address will not be published. Required fields are marked *