Adding Right Sidebar to Homepage, not static

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

This topic contains 1 reply, has 2 voices, and was last updated by  Bishal Napit 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #171

    stunningstuff
    Participant

    Can you please tell me how to do this? I can get the sidebar to show up on the additional pages, but not the home page. Even if I make it static, it does not show up.
    Thanks.

    http://www.thestunningstuff.com

    #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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.