Problems removing widget areas
-
I am very new to WordPress and have been struggling with a Child Theme I’ve created based on Gridsby. I want to get rid of the widget sidebar and have the page text/images take up the entire space. I’ve searched for ways to do this and have followed the directions, but every time I modify the functions.php file, I get errors and end up having to reinstall the functions on the server. It’s driving me nuts and I don’t know how to fix the problem. Can anyone please help? Pretty please? Here is the code on the functions.php file. What am I doing wrong?
<?php
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’, get_stylesheet_uri(), array( ‘parent-style’ ) );
}<?php
add_filter( ‘sidebars_widgets’, ‘disable_all_widgets’ );function disable_all_widgets( $sidebars_widgets ) {
if ( is_home() )
$sidebars_widgets = array( false );
return $sidebars_widgets;
}
?>
- The topic ‘Problems removing widget areas’ is closed to new replies.