Yes, the entire space should be gone (in favor of the main column. Sadly many themes hide the side column but do not expand the main one.
From what you said in here you would like the sidebar to disappear and at the same time the main column to expand.
This is a perfectly legal request. To do so the only the reasonable solution would be to edit the single.php file that is the template for your posts.
The HTML of your single.php file is something we should not style from functions.php.
Much easier you would typically need to remove the <?php get_sidebar(); ?>
part and the update the HTML classes to expand the main column.
Related Posts:
- Adding fields to the “Add New User” screen in the dashboard
- Displaying the number of updates available in the Admin area
- What’s the difference between admin_url() and get_admin_url() functions?
- How to influence the information displayed on widget inside wp-admin
- How to override admin-bar style
- TinyMCE custom styles remove class when switching styles
- How do I create a new WP admin color scheme?
- AJAX handler throws 400 (Bad request) – why?
- wp-admin page is blank
- Check if has any sidebar active on current page
- Replacing select2 in admin backend for all selects
- difference between add_object_page and add_menu_page
- How to fix a theme with page.php Default Template that accidentally deleted?
- Target a certain page within wordpress backend (admin) i.e. Pages > About
- Dynamically Register Sidebars For Each Top Level Page
- Functions.php: If its single?
- How can I rename the WordPress AJAX URL? [duplicate]
- Change a sidebar name?
- add sidebar area to header of child theme
- Advice: Template structure – php blocks in sidebar or someting else?
- How to add a column to the Trash page?
- Best way to programatically add “rel” attributes to page and post images
- Comments to only be seen by their author
- How to change menu icon which is overriden (i.e. by WooCommerce) [closed]
- Make “sidebar template” the default template for new pages
- Custom roles can’t access to wp-admin
- password protected post policy
- Missing argument 2 for a custom function widgets_init
- Removing the main link to Jetpack from the menu
- Access / Filter block variations in Gutenberg, in WordPress 5.6
- How to remove howdy dropdown menu content
- is_dynamic_sidebar always returns true while using Jetpack visibility
- Add Featured image column into wordpress admin on pages AND posts
- Selective Product Category for Carousel
- How to insert custom widget in custom sidebar in theme activation?
- Add caption functionality to custom WordPress theme
- Display post shortcode content in the sidebar?
- Best practices regarding the creation of custom widgets?
- How to force field validation first, then its values saved durning edit profile?
- Move ‘current-menu-item’ class on #adminmenu li from Posts to Pages for Taxonomy Edit Screen
- How to auto refresh when user change postcode
- Sections and tabs DRY – WordPress settings API
- How to install Segment on WordPress without a plugin
- Get First Child Page ID or Permalink in WordPress Admin
- Creating A New Admin Menu Tab For Theme Options
- wp-admin won’t load after setting wp-login custom url
- How do you Permanently Delete Sidebars
- Wp admin – Set default value to 999 in comments
- Custom Sidebar only on single post
- Is `is_sidebar_active()` deprecated, and showing error?
- Remove “Published On” inside wp-admin
- register_sidebar_widget is deprecated since version 2.8! Use wp_register_sidebar_widget() instead
- Where do i create my own function in wp-admin
- How to remove comment count column in Posts inside the admin dashboard?
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- Sortable column (by numbers) in admin users
- error at login page in wordpress
- Why is it so hard to add a class to the tag in the sidebar widget?
- get_terms (or tax_query) for term of current post?
- Update to functions.php not showing in dashboard
- Add element to widgetpage
- Register_Sidebar overwriting itself and doesn’t exist in global $wp_registered_sidebars;
- “options.php” not found
- Insert a field with PREG_REPLACE – strange behaviour
- New checkbox in custom widget isn’t saving data
- I would like single.php to act just like index.php
- How to change a specific admin label
- Multiple, Dynamic, Sidebars Problem – First Sidebar not working properly
- How to change a meta value (of a published post) after X days.?
- Block all plug-ins from initiating redirection upon activation?
- How to add custom metakey to shop_order page’s searching function?
- How do you insert code into the sidebar?
- Unable to login after registration
- Insert Modal on user first login
- How to display different blocks for mobile and desktops
- Using AJAX on frontend: Synchronous XMLHttpRequest deprecation except for admin role
- WP Enqueue Script Error
- DISABLE wordpress upgrade page
- Change is_front_page() to is_page() to display ‘hero’ on entire site?
- admin-ajax.php & my wp-admin folder url showing in header
- Trying to Add a LEFT Sidebar?
- What is wrong with functions.php? Fills error log with same error
- How to add next height number in Order Attributes inside the Add new page. [duplicate]
- How to programmatically GET (to know) which Sidebar (or) which Menu is being used on Different Pages?
- unregister_sidebar in child theme not working
- Additional Sidebar
- Add the title of a widget as an ID – for anchor links
- Show stuff everywhere except single post?
- Changed functions.php file and now site is blank [closed]
- Setcookie not setting cookies anywhere except admin
- How Do I Prevent Featured Image Caption Displaying Above And Below Image
- install Segment on WordPress
- Missing feature image link function
- What’s the difference between home_url() and site_url()
- Remove “Category:”, “Tag:”, “Author:” from the_archive_title
- get_template_directory_uri pointing to parent theme not child theme
- How to customize the_archive_title()?
- Changing Admin Menu Labels
- remove empty paragraphs from the_content?
- What is the “with_front” rewrite key?