Blog archive sidebar drops below content
Hi there,
Using the default WordPress setup for Blog results in the sidebar dropping below the content:
Customize -> Site Settings -> Static homepage -> Blog page and select a page.
That selected page uses index.php, which doesn’t have
<div class="grid">wrapping the columns.
And when using this option (which is the default wordpress way) there is no page template selection possible.
Example on http://try.layerswp.com/
I know there are easy workarounds, but I think the default wordpress way should work too 🙂
Cheers,
Marc.
Hello,
When you select a page to output posts using the Settings > Reading settings, WordPress overrides that page loop with the default template which does not have theme-specific support. Layers provides a “Blog”page template to provide theme-specific styling and support for the post list, so you will need to set the Reading option to default/blank for the posts option, and only set a static home page. Then under Pages, edit your Blog page and ensure the blog page template is selected.
Blog or Post Archive Sidebar Drops Below Content
Hi,
It doesn’t use a default WordPress template (since there is none), but the default template in the Theme, which is in our case is layerswp/index.php
At the moment its contents are
<?php /** * Standard blog index page * * @package Layers * @since Layers 1.0.0 */ get_header(); ?> <div class="container content-main archive clearfix"> <?php get_sidebar( 'left' ); ?> <?php if( have_posts() ) : ?> <div <?php layers_center_column_class(); ?>> <?php while( have_posts() ) : the_post(); ?> <?php get_template_part( 'partials/content' , 'list' ); ?> <?php endwhile; // while has_post(); ?> <?php the_posts_pagination(); ?> </div> <?php endif; // if has_post() ?> <?php get_sidebar( 'right' ); ?> </div> <?php get_footer();
So wrapping the content with <div class=”grid”> … </div> like it is done in layerswp/archives.php would solve this.
<?php /** * Standard blog index page * * @package Layers * @since Layers 1.0.0 */ get_header(); ?> <div class="container content-main archive clearfix"> <div class="grid"> <?php get_sidebar( 'left' ); ?> <?php if( have_posts() ) : ?> <div <?php layers_center_column_class(); ?>> <?php while( have_posts() ) : the_post(); ?> <?php get_template_part( 'partials/content' , 'list' ); ?> <?php endwhile; // while has_post(); ?> <?php the_posts_pagination(); ?> </div> <?php endif; // if has_post() ?> <?php get_sidebar( 'right' ); ?> </div> </div> <?php get_footer();