Blog sitebar (Masonry (grid style))


#1

Hello Support team,

How can I show the (right) sitebar in the Perth Pro Theme when I use the Masonry (grid style) by the blog-pages?

http://136.144.175.123/~voorbeeld/category/portfolio/blog/

Thanx,

Tjeerd


#2

Hello Tjeerd,

I don’t think that there is an easy way to do it, unfortunately.

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.


#3

Hello there,

Try editing the archive.php and home.php files with a child theme. In those files, replace this code block (near bottom line):

    <?php 
    	if ( get_theme_mod('blog_layout','classic') == 'classic' ) :
    		get_sidebar();
    	endif;
    ?>

with:

    <?php
    	if ( get_theme_mod('blog_layout','classic') == 'classic' || get_theme_mod('blog_layout','classic') == 'masonry-layout' ) :
    		get_sidebar();
    	endif;
    ?>

Then add this CSS code to Appearance > Customize > Additional CSS from dashboard.

    @media only screen and (min-width: 992px) and (max-width: 1199px) {
      #primary.masonry-layout{
        width: calc(100% - 283px) !important;
        width: -webkit-calc(100% - 283px) !important;
        width: -moz-calc(100% - 283px) !important;
      }
      #secondary.widget-area {
        width: 283px;
      }
    }

    @media only screen and (min-width: 1200px) {
      #primary.masonry-layout{
        width: calc(100% - 350px) !important;
        width: -webkit-calc(100% - 350px) !important;
        width: -moz-calc(100% - 350px) !important;
      }
      #secondary.widget-area {
        width: 350px;
      }  
    }

Regards,
Kharis


#4

Thanks Kharis,

That works well.

  Met vriendelijke groet, 
    
  Tjeerd Engel
 
    
  Tjeerd Engel - Websites & Internet Marketing 
  Lutswâl 4 | 8564 HA | Ruigahuizen
  Mobiel 06 - 119 52 361  
  info@tjeerdengel.nl | www.tjeerdengel.nl


#5

You’re welcome!

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