Reply To: Adding Right Sidebar to Homepage, not static

NapitWPTech Theme Support Forums Masonry Brick Adding Right Sidebar to Homepage, not static Reply To: Adding Right Sidebar to Homepage, not static

#172

Bishal Napit
Keymaster

@stunningstuff

Making the homepage static page need to show the sidebar area, unless you have set the default page layout via Appearance->Customize->Design Options->Default layout for pages section to No Sidebar Full Width or No Sidebar Content Centered option. However, if you setup the home page to be your blog page, then, this requires code customization work via the child theme. You can find the tutorial on creating the child theme as well as the sample child theme for this theme here: https://napitwptech.com/tutorial/wordpress-development/tutorial-creating-wordpress-child-theme/.

Now in the child theme, after you have followed the above mentioned instructions from the linked posts, you can duplicate the file index.php in the child theme and then find this code in that file: <?php do_action('masonry_brick_after_body_content'); ?> and then paste the below PHP code just before that mentioned code and check:
<?php get_sidebar(); ?>

Also, for the design issue which it creates after applying it, you might need to add the below CSS code in the Additional CSS Box provided via the Customizer Options and check:-

.home #primary.main-contents {
	width: 62%;
	float: left;
}
.home #secondary {
	width: 36%;
	float: right;
}
@media (max-width: 768px) {
	.home #primary.main-contents, .home #secondary {
		width: 100%;
		float: none;
	}
}

Hope these works.

If you like the theme and appreciate the work put out on the theme, then, you can help by rating this theme through this link here: https://wordpress.org/support/theme/masonry-brick/reviews/

Thanks.
Bishal Napit