Situation
Where a paragraph tag < p > or a break tag < br > just provide the spacing you need between on page elements.
Solution
- Add this code to your child theme functions.php file (you ARE using a child theme, aren’t you?!)
- Use shortcode [ spaceme height=”16″]
// Spacer Shortcode - User Adjustable. // Usage: Use shortcode [ spaceme height="xx" ] where xx is a number denoting the height one wants in pixels. Default is 5px. function spacey($atts) { extract(shortcode_atts(array( "height" => '5', ), $atts)); return '<div style="height: '. $height.'px; width: 100%; display: block;"></div>'; } add_shortcode('spaceme', 'spacey');
Demo
Thirty Five Pixel Space follows this paragraph. Fusce ac felis sit amet ligula pharetra condimentum. In hac habitasse platea dictumst. Praesent congue erat at massa. Morbi mollis tellus ac sapien. Vestibulum suscipit nulla quis orci.
Fifteen Pixel Space follows this paragraph. Vestibulum volutpat pretium libero. Fusce ac felis sit amet ligula pharetra condimentum. Maecenas ullamcorper, dui et placerat feugiat, eros pede varius nisi, condimentum viverra felis nunc et lorem. Cras risus ipsum, faucibus ut, ullamcorper id, varius ac, leo. Proin magna.
Five Pixel Space follows this paragraph. In dui magna, posuere eget, vestibulum et, tempor auctor, justo. Sed aliquam ultrices mauris. Duis leo. Nunc nec neque. Proin magna.
Proin faucibus arcu quis ante. Nullam vel sem. Sed in libero ut nibh placerat accumsan. In dui magna, posuere eget, vestibulum et, tempor auctor, justo. Fusce ac felis sit amet ligula pharetra condimentum.
Subscribe for Divi Freebies
Plugin update notifications :: stay abreast of new and or updated items by opting in to my very occasional email newsletter. I swear by all that is right and holy your email address will never be shared, sold, traded or otherwise abused and I seriously doubt you'll see anything more than plugin/code update notifications when they are of the utmost importance.
[mailpoet_form id="1"]