Want 3-columns + sidebar on posts page

Following advice here, I edited archive.php and home.php in child theme to add sidebar to masonry-grid:

<?php /** if ( ( $layout == 'modern' ) || ( $layout == 'classic-alt' ) || ( $layout == 'classic' ) ) : get_sidebar(); endif; */ get_sidebar(); ?>

This gives me a two-column grid plus sidebar. Is there a (hopefully easy) way to get three-columns + sidebar on wider screens?

Hi,

Thank you for contacting us. I am happy to help with your queries.

We have a solution already for that, which you can follow from this thread. I hope it can help.

Regards,
Kharis
aThemes Support

A misunderstanding - I had already followed the instructions on the link you noted to add the sidebar. But I want three-columns masonry posts rather than two - in addition to the sidebar. Is there an easy solution that doesnt involve javascript?

Hi,

Sorry for the misunderstanding.

As inspected further, you’ll need to maintain the code changes in the archive.php and home.php files.

And use the below CSS code to apply into your website’s Additional CSS.

    @media only screen and (min-width:992px){
      
      .masonry-layout.col-md-9{
        width: 75% !important; 
      }
      
    }

    @media only screen and (min-width:1200px){
      
      .masonry-layout .hentry{
        width: 260px !important;
      }   
      
    }  

    @media only screen and (min-width:992px) and (max-width:1199px){
      
      .masonry-layout .hentry{
        width: 210px !important;
      } 
      
    }  

Regards,
Kharis
aThemes Support

Kharis, it worked like a charm! Thanks much.

Joe

You’re welcome Joe!

Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.

Regards,
Kharis
aThemes Support