Using Right Sidebar Area

By Chris Piekarz
August 11, 2022, 3:37 pm EDT

Hi -

We are not using the primary or secondary sidebars and we want to expand our page content into that white space. We also want to keep the left sidebar navigation active, so using the full width page template is not an option. I created a new page template (code below) removing the sidebar( ) call, but the text doesn't move into that space. Manipulating the col-md and col-md-push values either causes the left sidebar to get overwritten or moves it from the left margin. So, is there a way to keep the left sidebar "anchored" to the left margin while allowing the main page content to expand?

UUA Theme 1.33, Wordpress 6.01, PHP 8.0

---------- Page template -------------

<?php
/**
* Template Name: No Right Sidebar
*
* Chris Piekarz
* Unitarian Universalist Fellowship of Northern Nevada
* 20220810
*/

get_header(); ?>

<div class="primary-content col-md-7 col-md-push-2">
<main id="main" class="main" role="main">

<?php
while ( have_posts() ) : the_post();

get_template_part( 'partials/content', 'page' );

// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;

endwhile; // End of the loop.
?>

</main><!-- #main -->
 </div><!-- .primary-content -->

<?php get_sidebar('left'); ?>

<?php get_footer(); ?>