{"id":18392,"date":"2019-12-13T11:46:06","date_gmt":"2019-12-13T16:46:06","guid":{"rendered":"https:\/\/www.boldgrid.com\/support\/?p=18392"},"modified":"2020-10-28T11:12:25","modified_gmt":"2020-10-28T15:12:25","slug":"how-to-disable-the-blog-sidebar-in-gridone","status":"publish","type":"post","link":"https:\/\/www.boldgrid.com\/support\/boldgrid-themes\/how-to-disable-the-blog-sidebar-in-gridone\/","title":{"rendered":"How to Disable the Blog Sidebar in GridOne"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<?xml encoding=\"utf-8\" ?><html><body><p>BoldGrid themes installed through the Inspirations plugin display the sidebar by default for all blog post and archive pages, but sometimes you do not want it to show.&nbsp; This guide will demonstrate how you can use filters to hook into the theme configuration and make the customizations you need.<\/p>\n<p>The best way to add filters to your website&rsquo;s theme is to use a plugin, such as <a href=\"https:\/\/wordpress.org\/plugins\/code-snippets\/\">Code Snippets<\/a>, which will allow you to make the necessary changes without modifying your theme files directly.&nbsp; This biggest reason to use this method is that it allows your custom code to persist through theme updates.<\/p>\n<p>Once you have your preferred code manager installed you can create a new entry with the following snippet:<\/p>\n<pre>function hide_sidebar ($config) {\r\n    $config['template']['sidebar'] = [\r\n        'is_archive',\r\n        'is_blog',\r\n        'is_single',\r\n        '[page_home.php]is_page_template',\r\n        '[default]is_page_template',\r\n    ];\r\n    return $config;\r\n}\r\n\r\nadd_filter( 'boldgrid_theme_framework_config' , 'hide_sidebar' );<\/pre>\n<p>The sidebar will display automatically on every page, except for those included in the [&lsquo;template&rsquo;][&lsquo;sidebar&rsquo;] array within the theme configuration, and the provided snippet adds your blog pages to that array.<\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>BoldGrid themes installed through the Inspirations plugin display the sidebar by default for all blog post and archive pages, but sometimes you do not want it to show.&nbsp; This guide will demonstrate how you can use filters to hook into the theme configuration and make the customizations you need. The best way to add filters [&hellip;]<\/p>\n","protected":false},"author":880,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","footnotes":""},"categories":[764],"tags":[],"class_list":["post-18392","post","type-post","status-publish","format-standard","hentry","category-boldgrid-themes"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/users\/880"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/comments?post=18392"}],"version-history":[{"count":3,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18392\/revisions"}],"predecessor-version":[{"id":41340,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/posts\/18392\/revisions\/41340"}],"wp:attachment":[{"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/media?parent=18392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/categories?post=18392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boldgrid.com\/support\/wp-json\/wp\/v2\/tags?post=18392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}