Welcome! To use this support forum, please Login or Join Today!

   

Side bar on static home page

{name}
Rank

Total Posts: 1

Joined 2014-12-21

PM

 

Hi,

For the website I am working on I have created a static home page. I have used the layout builder to compose the page. Now I would like to add a vertical bar at the right side to list some sponsor logos.

My idea was to use the side bar for this, but I don’t seem to be able to make the side bar visible on this page. Is there a way I can include a side bar on this page? If not, do you have an alternative how I can get more or less the same result in another way?

To see, what I have created so far, please have a look at http://77.171.98.90

By the way, the more I get familiar with the Lightfast theme, the more I like it!

Kind regards,
Arthur

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Hi Arthur,

Unfortunately the layout builder doesn’t use a sidebar widget area by default.

It is, however fairly simple to make this customization yourself…

First, copy builder-page.php from your parent theme to your child theme directory to override it.

Then, in the child theme’s builder-page.php at the bottom, change:

do_action('skeleton_after_content');
do_action('skeleton_inner_wrap_close');
get_footer(); 

to:

do_action('skeleton_after_content');
get_sidebar();
do_action('skeleton_inner_wrap_close');
get_footer(); 

Lastly, just add this function to your child theme’s functions.php:

function child_add_column() {
    
if (is_page_template('builder-page.php')) {
        
return 'eleven';
    
else {
        
if ( is_active_sidebar('sidebar-2') ) {
            
return 'eleven';
        
else {
            
return 'sixteen';
        
}
    }
}
add_filter
('skeleton_set_colwidth''child_add_column'11);