DB-hub Technology Cloud How to disable the right sidebar and centralize pages?

How to disable the right sidebar and centralize pages?

Disable sidebar

Block themes often build the sidebar as a Template Part. Instead of CSS, remove it at the template level:

Appearance → Editor (Site Editor)

Templates → Page (or the specific template your page uses) → Edit

Select the sidebar/columns area containing widgets → Delete

Save.

centralize pages

Right-click your page → Inspect → hover over the main content block. Look for its class or ID

the

<

div id=”sidebar”> with class col-lg-4 col-md-4 is still taking up grid space, so even if it looks empty, it pushes your main content (our-services) to the left.

  1. Locate the template
  • In most themes, the sidebar is rendered with this function call:
<?php get_sidebar(); ?>
  • This is usually inside:
    • page.php
    • single.php
    • index.php
    • or a template part like template-parts/sidebar.php
  1. Remove (or conditionally disable) the sidebar

Remove sidebar everywhere
Just open the relevant file (for example page.php) and delete or comment out:

<?php get_sidebar(); ?>

After removing the sidebar, the main content area may still have Bootstrap classes like col-lg-8.
To make it span full width, update the class in your template:
for example:

  <div class="row">
          <!--    <div class="col-lg-4 col-md-4" id="sidebar"><?php get_sidebar();?></div>  -->
          <!--    <div id="our-services" class="services col-lg-8 col-md-8">    -->
          <div id="our-services" class="services col-lg-12 col-md-12">

Related Post