Quick Fix: Static Homepage Sidebar appears below instead of beside content


I really appreciate such a great free theme.

I think I found a bug in the theme:

When a static front page is selected in the wordpress Settings > Reading the front-page immediately goes full-width and shows the homepage sidebar widgets at the bottom of the page instead of beside the page content.

Even at the maximum browser width, the sidebar never slides up beside the content, it is always below the content. Changing the page template to “default” or “Full width no sidebar” has no effect.

Here is how I fixed this in your dazzling theme code:

edit front-page.php

Change line 13 from:
col-sm-12 col-md-12
col-sm-8 col-md-8

Move the sidebar code from line 31 to line 45

Here’s what the full text of front-page.php should look like:


    if ( get_option( 'show_on_front' ) == 'posts' ) {
        get_template_part( 'index' );
    } elseif ( 'page' == get_option( 'show_on_front' ) ) {

get_header(); ?>

<?php dazzling_featured_slider(); ?>
<?php dazzling_call_for_action(); ?>

<div id="content" class="site-content container">
	<div id="primary" class="content-area col-sm-8 col-md-8">
		<main id="main" class="site-main" role="main">

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

				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
					<div class="entry-content">
						<?php the_content(); ?>
							wp_link_pages( array(
								'before' => '<div class="page-links">' . __( 'Pages:', 'dazzling' ),
								'after'  => '</div>',
							) );
					</div><!-- .entry-content -->
					<?php edit_post_link( __( 'Edit', 'dazzling' ), '<footer class="entry-meta"><i class="fa fa-pencil-square-o"></i><span class="edit-link">', '</span></footer>' ); ?>
				</article><!-- #post-## -->


					// If comments are open or we have at least one comment, load up the comment template
					if ( comments_open() || '0' != get_comments_number() ) :

			<?php endwhile; // end of the loop. ?>

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

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

This not a mistake and widgets are aligned horizontally below page content and this page doesn’t have sidebar to provide more flexibility for users. Theme is meant to be configured like this when static page is used: https://colorlib.com/unite/ (different theme but you to understand the layout).

Turns out that more people use first page without sidebar and adds content by using shortcodes and columns.

This is done on purpose but if you want to use regular content/sidebar setup you can simply remove or rename front-page.php template from theme foot folder and you are ready to go.