info@anzum.com

When writing HTML code or working with WordPress pages, we often come across a situation where we want to clear areas and put next div or element on next line instead of floating with previous block.

You can write quick HTML to fix such issues. But in case of repeated situation, you may create this handy code using WordPress shortcode feature. Add the following lines in your theme’s funtions.php and use the [clear] shortcode you clear the areas on left and right in HTML.

Step 1:

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

// Code
return '

';
}
add_shortcode( 'clear', 'ad_clear_shortcode' );


Step 2:
And when you want to use the clear property, you can simply use the shortcode [clear] instead of using the long

[clear]

Backup of funtions.php is recommended before making any change to it so that you can restore it via FTP or file manager in order something goes wrong in editing.

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Discover what's new at Divi Extended

Discover what's new at Divi Extended

Connect with Divi Extended for info on our new products and updates.

Welcome on Board

%d bloggers like this: