Disable widget areas on specific pages

add_filter( 'sidebars_widgets', 'disable_sidebar_widgets' );
function disable_sidebar_widgets( $sidebars_widgets ) {
        if ( is_page('about-me') )
                $sidebars_widgets = array( false );
                return $sidebars_widgets;

Note: Replaced about-me by your pages url

The following two tabs change content below.

Md Jahed

Latest posts by Md Jahed (see all)

Leave a Reply

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