Hi bcworkz, sorry to open this up again, but i’m having a little bit of trouble.
So, whenever I add anything to my sidebar it automatically resizes the archive pages and post pages to fit the sidebar in, even when i’ve removed the get_sidebar()
from the archive and single php pages.
I’ve tried everything i can think of, and everything I’ve found on google, to resize the archive pages that I don’t want to display a sidebar back to full width, but no luck.
After I figure out how to resize posts and archive pages, i’m going to make custom php files to keep the sidebar for the archives and posts i do want to have the sidebar in.
here’s an archive page that i can’t get to go full width:
https://calvarytucson.wpengine.com/teachings/
For the posts, I wrapped all of the content in a div and set that to 151.89% width, which is sort of a work around. Applying that to #content didn’t resize it fully, instead it pushed it to the right after it hit a certain width.
here’s a page with that:
https://calvarytucson.wpengine.com/teachings/life-as-god-intended/
here’s the archive page code before I took out the sidebar:
<?php
/**
* The template for displaying Archive pages
*
* Used to display archive-type pages if nothing more specific matches a query.
*
*
* @since Yaga 1.0.0
*/
$yaga_page = new Yaga_View();
get_header(); ?>
<div id="primary" class="content-area primary-content-area">
<?php $yaga_page->header();
$yaga_page->start_container();
if ( have_posts() ) :
$yaga_page->grid_container_starts();
do_action( 'yaga_before_archive_loop' );
while ( have_posts() ) : the_post();
get_template_part( 'content', 'grid' );
endwhile;
do_action( 'yaga_after_archive_loop' );
$yaga_page->grid_container_ends();
else :
get_template_part( 'content', 'none' );
endif;
$yaga_page->get_sidebar();
$yaga_page->end_container(); ?>
</div><!-- #primary -->
<?php get_footer();
and after I removed the get_sidebar:
<?php
/**
* The template for displaying Archive pages
*
* Used to display archive-type pages if nothing more specific matches a query.
*
*
* @since Yaga 1.0.0
*/
$yaga_page = new Yaga_View();
get_header(); ?>
<div id="primary" class="content-area primary-content-area">
<?php $yaga_page->header();
$yaga_page->start_container();
if ( have_posts() ) :
$yaga_page->grid_container_starts();
do_action( 'yaga_before_archive_loop' );
while ( have_posts() ) : the_post();
get_template_part( 'content', 'grid' );
endwhile;
do_action( 'yaga_after_archive_loop' );
$yaga_page->grid_container_ends();
else :
get_template_part( 'content', 'none' );
endif;
$yaga_page->end_container(); ?>
</div><!-- #primary -->
<?php get_footer();
Here’s the single page before I removed the sidebar:
<?php
/**
* The Template for displaying single posts, also the default template for displaying custom post types
*
* @since Yaga 1.0
*/
$yaga_post = new Yaga_Single_View();
get_header(); ?>
<div id="primary" class="content-area primary-content-area">
<div id="content" class="site-content cf" role="main">
<?php
$yaga_post->header();
$yaga_post->start_container();
while ( have_posts() ) : the_post();
$yaga_post->content();
endwhile;
$yaga_post->get_sidebar();
$yaga_post->end_container();?>
</div><!-- #content -->
</div><!-- #primary -->
<?php
get_footer(); ?>
and with the sidebar removed:
<?php
/**
* The Template for displaying single posts, also the default template for displaying custom post types
*
* @since Yaga 1.0
*/
$yaga_post = new Yaga_Single_View();
get_header(); ?>
<div id="primary" class="content-area primary-content-area">
<div id="content" class="site-content cf" role="main">
<?php
$yaga_post->header();
$yaga_post->start_container();
while ( have_posts() ) : the_post();
$yaga_post->content();
endwhile;
$yaga_post->get_sidebar();
$yaga_post->end_container();?>
</div><!-- #content -->
</div><!-- #primary -->
<?php
get_footer(); ?>
thank you again for all your help!