Sidebar
-
Quick question – how can I remove the sidebar from this theme? Could you please assist?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Sidebar’ is closed to new replies.
Home / Theme: Linia Magazine / Sidebar
Quick question – how can I remove the sidebar from this theme? Could you please assist?
Hi
This theme is hard coded to be two columns, however you can easily make it single column by adding following lines in your functions.php
You can do it either by using your ftp programme or if your installation permits you can do it through Admin -> Appearance -> Editor, select functions.php from right hand sidebar, paste two following code and hit update button, that’s it!
function linia_magazine_quickfix_blog_fullwidth($classes) {
$classes[] = 'page-template-page-templatesfull-width-php';
return $classes;
}
add_filter('body_class', 'linia_magazine_quickfix_blog_fullwidth');
function linia_magazine_disable_sidebar($sidebars_widgets) {
if (!is_admin() && is_array($sidebars_widgets) && array_key_exists('sidebar-1', $sidebars_widgets))
$sidebars_widgets['sidebar-1'] = array();
return $sidebars_widgets;
}
add_filter('sidebars_widgets', 'linia_magazine_disable_sidebar');