Wrapping All WordPress Site inside in a Custom Div


// Smooth content scroller wrapper for all site
function div_wrapper_open() { 
   echo '
   
   <div id="smooth-wrapper"><div id="smooth-content">
   
   ';
} 
add_action( 'wp_body_open', 'div_wrapper_open' ); 

function div_wrapper_close() { 
   echo '
   
   </div></div>
   
   ';
} 
add_action( 'wp_footer', 'div_wrapper_close' ); 

add this to your fucntions.php to wrap all your site in 2 div.

i use this usually for smooth scroll for gsap sites. you can edit it whatever you want.

Leave the first comment